original_docstring: 
      Verifies that the chain is not missing any parameters. Asserts if any parameters are missing, or if a
      reference parameter (@something) has not provider
      
docstring: Verifies that the chain is not missing any parameters. Asserts if any parameters are missing, or if a
  reference parameter (@something) has not provider
docstring_tokens: Verifies that the chain is not missing any parameters . Asserts if any parameters are missing or if a reference parameter ( @something ) has not provider
code: def verify_chain_arguments(sig: Signature):
      """
      Verifies that the chain is not missing any parameters. Asserts if any parameters are missing, or if a
      reference parameter (@something) has not provider
      """
      try:
          tasks = sig.tasks
      except AttributeError:
          tasks = [sig]
  
      missing = {}
      previous = set()
      ref_args = {}
      undefined_indirect = {}
      for task in tasks:
          task_obj = sig.app.tasks[task.task]
          partial_bound = set(signature(task_obj.run).bind_partial(*task.args).arguments.keys())
          kwargs_keys = set(task.kwargs.keys())
  
          if isinstance(task_obj, FireXTask):
              required_args = task_obj.required_args
          else:
              required_args, _ = parse_signature(inspect.signature(task_obj.run))
  
          missing_params = set(required_args) - (partial_bound | kwargs_keys | previous)
          if missing_params:
              missing[task_obj.name] = missing_params
  
          previous |= (partial_bound | kwargs_keys)
          # get @returns for next loop
          try:
              current_task_returns = set(task_obj.return_keys)
              previous |= current_task_returns
          except AttributeError:
              try:
                  current_task_returns = set(get_attr_unwrapped(task_obj, '_decorated_return_keys'))
                  previous |= current_task_returns
              except AttributeError:
                  current_task_returns = set()
  
          # If any of the previous keys has a dynamic return, then we can't do any validation
          if any(FireXTask.is_dynamic_return(k) for k in current_task_returns):
              break
  
          # check for validity of reference values (@ arguments) that are consumed by this microservice
          necessary_args = getfullargspec(undecorate(task_obj)).args
          new_ref = {k: v[1:] for k, v in task.kwargs.items() if
                     hasattr(v, 'startswith') and v.startswith(BagOfGoodies.INDIRECT_ARG_CHAR)}
          ref_args.update(new_ref)
          for needed in necessary_args:
              if needed in ref_args and ref_args[needed] not in previous:
                  undefined_indirect[needed] = ref_args[needed]
  
      if missing:
          txt = ''
          for k, v in missing.items():
              for arg in v:
                  if txt:
                      txt += '\n'
                  service_path = k.split('.')
                  txt += ' ' + arg + '\t: required by "%s" (%s)' % \
                         (service_path[-1], '.'.join(service_path[0:-1]))
          raise InvalidChainArgsException('Missing mandatory arguments: \n%s' % txt, missing)
      if undefined_indirect:
          txt = "\n".join([k + ": " + v for k, v in undefined_indirect.items()])
          raise InvalidChainArgsException('Chain indirectly references the following unavailable parameters: \n%s' %
                                          txt, undefined_indirect)
      return True
code_tokens: def verify_chain_arguments ( sig : Signature ) : try : tasks = sig . tasks except AttributeError : tasks = [ sig ] missing = { } previous = set ( ) ref_args = { } undefined_indirect = { } for task in tasks : task_obj = sig . app . tasks [ task . task ] partial_bound = set ( signature ( task_obj . run ) . bind_partial ( * task . args ) . arguments . keys ( ) ) kwargs_keys = set ( task . kwargs . keys ( ) ) if isinstance ( task_obj , FireXTask ) : required_args = task_obj . required_args else : required_args , _ = parse_signature ( inspect . signature ( task_obj . run ) ) missing_params = set ( required_args ) - ( partial_bound | kwargs_keys | previous ) if missing_params : missing [ task_obj . name ] = missing_params previous |= ( partial_bound | kwargs_keys ) try : current_task_returns = set ( task_obj . return_keys ) previous |= current_task_returns except AttributeError : try : current_task_returns = set ( get_attr_unwrapped ( task_obj , '_decorated_return_keys' ) ) previous |= current_task_returns except AttributeError : current_task_returns = set ( ) if any ( FireXTask . is_dynamic_return ( k ) for k in current_task_returns ) : break necessary_args = getfullargspec ( undecorate ( task_obj ) ) . args new_ref = { k : v [ 1 : ] for k , v in task . kwargs . items ( ) if hasattr ( v , 'startswith' ) and v . startswith ( BagOfGoodies . INDIRECT_ARG_CHAR ) } ref_args . update ( new_ref ) for needed in necessary_args : if needed in ref_args and ref_args [ needed ] not in previous : undefined_indirect [ needed ] = ref_args [ needed ] if missing : txt = '' for k , v in missing . items ( ) : for arg in v : if txt : txt += '\n' service_path = k . split ( '.' ) txt += ' ' + arg + '\t: required by "%s" (%s)' % ( service_path [ - 1 ] , '.' . join ( service_path [ 0 : - 1 ] ) ) raise InvalidChainArgsException ( 'Missing mandatory arguments: \n%s' % txt , missing ) if undefined_indirect : txt = "\n" . join ( [ k + ": " + v for k , v in undefined_indirect . items ( ) ] ) raise InvalidChainArgsException ( 'Chain indirectly references the following unavailable parameters: \n%s' % txt , undefined_indirect ) return True
short_docstring: Verifies that the chain is not missing any parameters.
short_docstring_tokens: Verifies that the chain is not missing any parameters .
comment: """
      Verifies that the chain is not missing any parameters. Asserts if any parameters are missing, or if a
      reference parameter (@something) has not provider
      """$SEP$# get @returns for next loop$SEP$# If any of the previous keys has a dynamic return, then we can't do any validation$SEP$# check for validity of reference values (@ arguments) that are consumed by this microservice