code: def _get_artifact_context(run, file_type):
      
      sha1sum = None
      image_file = False
      log_file = False
      config_file = False
  
      if request.path == '/image':
          image_file = True
          if file_type == 'before':
              sha1sum = run.ref_image
          elif file_type == 'diff':
              sha1sum = run.diff_image
          elif file_type == 'after':
              sha1sum = run.image
          else:
              abort(400)
      elif request.path == '/log':
          log_file = True
          if file_type == 'before':
              sha1sum = run.ref_log
          elif file_type == 'diff':
              sha1sum = run.diff_log
          elif file_type == 'after':
              sha1sum = run.log
          else:
              abort(400)
      elif request.path == '/config':
          config_file = True
          if file_type == 'before':
              sha1sum = run.ref_config
          elif file_type == 'after':
              sha1sum = run.config
          else:
              abort(400)
  
      return image_file, log_file, config_file, sha1sum
docs: Gets the artifact details for the given run and file_type.