original_docstring: 
      Associate hook arguments provided in the call with hook attributes. Parses the
      hook's `_args` attribute to know how to map arguments are mapped to where and
      deal with rendering by default.
      
docstring: Associate hook arguments provided in the call with hook attributes. Parses the
  hook's `_args` attribute to know how to map arguments are mapped to where and
  deal with rendering by default.
docstring_tokens: Associate hook arguments provided in the call with hook attributes . Parses the hook ' s ` _args ` attribute to know how to map arguments are mapped to where and deal with rendering by default .
code: def evaluate_args(args: list, hook_dict: dict, Hook: Type[BaseHook]):
      """
      Associate hook arguments provided in the call with hook attributes. Parses the
      hook's `_args` attribute to know how to map arguments are mapped to where and
      deal with rendering by default.
      """
      for i, v in enumerate(args):
          # Iterate over the input args
          if i + 1 == len(Hook._args):
              # We are at the last argument mapping so we need to join the remaining
              # arguments as a single string if it is not a list of another map.
              if Hook.__fields__[Hook._args[i]].type_ in (str, float, int, bool, Any):
                  # Was parsed on spaces so reconstructed.
                  value = ' '.join(args[i:])
              # fmt: skip
              elif isinstance(Hook.__fields__[Hook._args[i]], list):
                  # If list then all the remaining items
                  value = args[i:]
              else:
                  # Only thing left is a dict
                  if len(args[i:]) > 1:
                      raise ValueError(
                          f"Can't specify multiple arguments for map argument "
                          f"{Hook.__fields__[Hook._args[i]]}."
                      )
                  # Join everything up as a list as it doesn't make sense to do anything
                  # else at this point.
                  value = args[i]
  
              hook_dict[Hook._args[i]] = value
              return
          else:
              # The hooks arguments are indexed
              try:
                  hook_dict[Hook._args[i]] = v
              except IndexError:
                  raise UnknownArgumentException(f"Unknown argument {Hook._args[i]}.")
code_tokens: def evaluate_args ( args : list , hook_dict : dict , Hook : Type [ BaseHook ] ) : for i , v in enumerate ( args ) : if i + 1 == len ( Hook . _args ) : if Hook . __fields__ [ Hook . _args [ i ] ] . type_ in ( str , float , int , bool , Any ) : value = ' ' . join ( args [ i : ] ) elif isinstance ( Hook . __fields__ [ Hook . _args [ i ] ] , list ) : value = args [ i : ] else : if len ( args [ i : ] ) > 1 : raise ValueError ( f"Can't specify multiple arguments for map argument " f"{Hook.__fields__[Hook._args[i]]}." ) value = args [ i ] hook_dict [ Hook . _args [ i ] ] = value return else : try : hook_dict [ Hook . _args [ i ] ] = v except IndexError : raise UnknownArgumentException ( f"Unknown argument {Hook._args[i]}." )
short_docstring: Associate hook arguments provided in the call with hook attributes.
short_docstring_tokens: Associate hook arguments provided in the call with hook attributes .
comment: """
      Associate hook arguments provided in the call with hook attributes. Parses the
      hook's `_args` attribute to know how to map arguments are mapped to where and
      deal with rendering by default.
      """$SEP$# Iterate over the input args$SEP$# We are at the last argument mapping so we need to join the remaining$SEP$# arguments as a single string if it is not a list of another map.$SEP$# Was parsed on spaces so reconstructed.$SEP$# fmt: skip$SEP$# If list then all the remaining items$SEP$# Only thing left is a dict$SEP$# Join everything up as a list as it doesn't make sense to do anything$SEP$# else at this point.$SEP$# The hooks arguments are indexed