code: def run_processor(
          processorClass,
          ocrd_tool=None,
          mets_url=None,
          resolver=None,
          workspace=None,
          page_id=None,
          log_level=None,
          input_file_grp=None,
          output_file_grp=None,
          parameter=None,
          working_dir=None,
  ): # pylint: disable=too-many-locals
      
      workspace = _get_workspace(
          workspace,
          resolver,
          mets_url,
          working_dir
      )
      if parameter is not None:
          if not '://' in parameter:
              fname = os.path.abspath(parameter)
          else:
              fname = workspace.download_url(parameter)
          with open(fname, 'r') as param_json_file:
              parameter = json.load(param_json_file)
      else:
          parameter = {}
      log.debug("Running processor %s", processorClass)
      processor = processorClass(
          workspace,
          ocrd_tool=ocrd_tool,
          page_id=page_id,
          input_file_grp=input_file_grp,
          output_file_grp=output_file_grp,
          parameter=parameter
      )
      ocrd_tool = processor.ocrd_tool
      name = '%s v%s' % (ocrd_tool['executable'], processor.version)
      otherrole = ocrd_tool['steps'][0]
      log.debug("Processor instance %s (%s doing %s)", processor, name, otherrole)
      processor.process()
      workspace.mets.add_agent(
          name=name,
          _type='OTHER',
          othertype='SOFTWARE',
          role='OTHER',
          otherrole=otherrole
      )
      workspace.save_mets()
      return processor
docs: Create a workspace for mets_url and run processor through it
  
      Args:
          parameter (string): URL to the parameter