<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def new_preload():
 """Job running prior to builds - fetches TestRunner image"""

    testrunner_image = get_testrunner_image()
    local_image = testrunner_image.rsplit(':')[-2].rsplit('/')[-1]
    version_file = 'testrunner_version.txt'
    template = yaml.safe_load(f"""
    machine:
      image: 'circleci/classic:201710-02'
    steps:
      - run:
          name: AWS login
          command: |-
            login="$(aws ecr get-login --no-include-email)"
            ${{login}}
      - run:
          name: Pull TestRunner Image
          command: docker pull {testrunner_image}
      - run:
          name: Make cache directory
          command: mkdir -p {cache_dir}
      - run:
          name: Obtain Testrunner Version
          command: echo $(docker run {testrunner_image} python -m trunner --version) > {cache_dir}/{version_file}
      - run:
          name: Export docker image layer cache
          command: docker save -o {cache_dir}/{testrunner_cache} {testrunner_image}
      - persist_to_workspace: # workspace is used later in this same build
          root: {cache_dir}
          paths: '{testrunner_cache}'
      - persist_to_workspace: # workspace is used later in this same build
          root: {cache_dir}
          paths: '{version_file}'
      - store_artifacts:
          path: {version_file}
    """)
    return 'preload', template