<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 The pipeline takes a long time to run for all committee sessions
You should limit to running on a subset of sessions with cache by adding a filter step to kns_documentcommitteesession
additional-steps
Step1:  Run the pipelines, setting the tika server environment var with the correct value
Step2:  Inspect the output
<ASSISTANT_TASK:>
Python Code:
%%bash
curl 172.17.0.1:9998 | tail
Explanation: The pipeline takes a long time to run for all committee sessions
You should limit to running on a subset of sessions with cache by adding a filter step to kns_documentcommitteesession
additional-steps:
  - run: filter
    cache: true
    parameters:
      in:
      - CommitteeSessionID: 2063122
      - CommitteeSessionID: 2063126
Start a tika server for parsing doc / docx files:
docker run --rm -p 9998:9998 logicalspark/docker-tikaserver
Check that the Tika server is accessible via the notebook environment:
End of explanation
!{'cd /pipelines; TIKA_SERVER_ENDPOINT=http://172.17.0.1:9998 dpp run --verbose ./committees/kns_documentcommitteesession'}
Explanation: Run the pipelines, setting the tika server environment var with the correct value:
End of explanation
from dataflows import Flow, load, printer
documentcommitteesessions = Flow(load('/pipelines/data/committees/kns_documentcommitteesession/datapackage.json')).results()[0][0]
session_id = 2063122
session = [session for session in documentcommitteesessions if session['CommitteeSessionID'] == session_id][0]
session_files = {
    'download': '/pipelines/data/committees/download_document_committee_session/'+session['download_filename'],
    'text': '/pipelines/data/committees/meeting_protocols_text/'+session['text_parsed_filename'],
    'text_hash': '/pipelines/data/committees/meeting_protocols_text/'+session['text_parsed_filename']+'.hash',
    'parts': '/pipelines/data/committees/meeting_protocols_parts/'+session['parts_parsed_filename'],
    'parts_hash': '/pipelines/data/committees/meeting_protocols_parts/'+session['parts_parsed_filename']+'.hash',
}
session_files
import subprocess
for k, v in session_files.items():
    print(subprocess.check_output('ls -lah '+v, shell=True).decode().strip())
Explanation: Inspect the output
End of explanation
<END_TASK>