original_docstring: 
      Take the input dict and impose global args/kwargs/flags with the following logic:
      - Use kwargs/flags as overriding keys in the input_dict
      - Check the input dict if there is a key matching the arg and run that key
        - Additional arguments are assessed as
          - If the call is to a hook directly, then inject that as an argument
          - If the call is to a block of hooks then call the next hook key
      - Otherwise run normally (ie full parsing).
  
      An exception exists for if the last arg is `help` in which case that level's help
      is called and exited 0.
      
docstring: Take the input dict and impose global args/kwargs/flags with the following logic:
  Use kwargs/flags as overriding keys in the input_dict
  Check the input dict if there is a key matching the arg and run that key
  Additional arguments are assessed as
  If the call is to a hook directly, then inject that as an argument
  If the call is to a block of hooks then call the next hook key
  Otherwise run normally .
  
  An exception exists for if the last arg is `help` in which case that level's help
  is called and exited 0.
docstring_tokens: Take the input dict and impose global args / kwargs / flags with the following logic : Use kwargs / flags as overriding keys in the input_dict Check the input dict if there is a key matching the arg and run that key Additional arguments are assessed as If the call is to a hook directly then inject that as an argument If the call is to a block of hooks then call the next hook key Otherwise run normally . An exception exists for if the last arg is ` help ` in which case that level ' s help is called and exited 0 .
code: def run_source(context: 'Context', args: list, kwargs: dict, flags: list):
      """
      Take the input dict and impose global args/kwargs/flags with the following logic:
      - Use kwargs/flags as overriding keys in the input_dict
      - Check the input dict if there is a key matching the arg and run that key
        - Additional arguments are assessed as
          - If the call is to a hook directly, then inject that as an argument
          - If the call is to a block of hooks then call the next hook key
      - Otherwise run normally (ie full parsing).
  
      An exception exists for if the last arg is `help` in which case that level's help
      is called and exited 0.
      """
      # Tackle is called both through the CLI and as a package and so to preserve args /
      # kwargs we
      if context.global_args is not None:
          args = args + context.global_args
          context.global_args = None
  
      # Global kwargs/flags are immediately consumed and injected into the kwargs/flags
      if context.global_kwargs is not None:
          kwargs.update(context.global_kwargs)
          context.global_kwargs = None
  
      if context.global_flags is not None:
          kwargs.update({i: True for i in context.global_flags})
          context.global_kwargs = None
  
      for k, v in kwargs:
          # Process kwargs as an overriding key
          context.input_dict.update({k: v})
  
      for i in flags:
          # Process flags by setting key to true
          context.input_dict.update({i: True})
  
      if len(args) >= 1:
          # TODO: Implement help
          # `help` which will always be the last arg
          # if args[-1] == 'help':
          #     # Calling help will exit 0. End of the line.
          #     run_help(context, context.input_dict, args[:-1])
  
          # Loop through all args
          for i in args:
              # Remove any arrows on the first level keys
              first_level_compact_keys = [
                  k[:-2] for k, _ in context.input_dict.items() if k.endswith('->')
              ]
              if i in first_level_compact_keys:
                  arg_key_value = context.input_dict[i + '->']
                  if isinstance(arg_key_value, str):
                      # We have a compact hook so nothing else to traverse
                      break
  
              elif i in context.input_dict:
                  context.key_path.append(i)
                  walk_sync(context, context.input_dict[i].copy())
                  context.key_path.pop()
              else:
                  raise ValueError(f"Argument {i} not found as key in input.")
          return
      walk_sync(context, context.input_dict.copy())
code_tokens: def run_source ( context : 'Context' , args : list , kwargs : dict , flags : list ) : if context . global_args is not None : args = args + context . global_args context . global_args = None if context . global_kwargs is not None : kwargs . update ( context . global_kwargs ) context . global_kwargs = None if context . global_flags is not None : kwargs . update ( { i : True for i in context . global_flags } ) context . global_kwargs = None for k , v in kwargs : context . input_dict . update ( { k : v } ) for i in flags : context . input_dict . update ( { i : True } ) if len ( args ) >= 1 : for i in args : first_level_compact_keys = [ k [ : - 2 ] for k , _ in context . input_dict . items ( ) if k . endswith ( '->' ) ] if i in first_level_compact_keys : arg_key_value = context . input_dict [ i + '->' ] if isinstance ( arg_key_value , str ) : break elif i in context . input_dict : context . key_path . append ( i ) walk_sync ( context , context . input_dict [ i ] . copy ( ) ) context . key_path . pop ( ) else : raise ValueError ( f"Argument {i} not found as key in input." ) return walk_sync ( context , context . input_dict . copy ( ) )
short_docstring: Take the input dict and impose global args/kwargs/flags with the following logic:
   Use kwargs/flags as overriding keys in the input_dict
   Check the input dict if there is a key matching the arg and run that key
   Additional arguments are assessed as
   If the call is to a hook directly, then inject that as an argument
   If the call is to a block of hooks then call the next hook key
   Otherwise run normally (ie full parsing).
short_docstring_tokens: Take the input dict and impose global args / kwargs / flags with the following logic : Use kwargs / flags as overriding keys in the input_dict Check the input dict if there is a key matching the arg and run that key Additional arguments are assessed as If the call is to a hook directly then inject that as an argument If the call is to a block of hooks then call the next hook key Otherwise run normally ( ie full parsing ) .
comment: """
      Take the input dict and impose global args/kwargs/flags with the following logic:
      - Use kwargs/flags as overriding keys in the input_dict
      - Check the input dict if there is a key matching the arg and run that key
        - Additional arguments are assessed as
          - If the call is to a hook directly, then inject that as an argument
          - If the call is to a block of hooks then call the next hook key
      - Otherwise run normally (ie full parsing).
  
      An exception exists for if the last arg is `help` in which case that level's help
      is called and exited 0.
      """$SEP$# Tackle is called both through the CLI and as a package and so to preserve args /$SEP$# kwargs we$SEP$# Global kwargs/flags are immediately consumed and injected into the kwargs/flags$SEP$# Process kwargs as an overriding key$SEP$# Process flags by setting key to true$SEP$# TODO: Implement help$SEP$# `help` which will always be the last arg$SEP$# if args[-1] == 'help':$SEP$#     # Calling help will exit 0. End of the line.$SEP$#     run_help(context, context.input_dict, args[:-1])$SEP$# Loop through all args$SEP$# Remove any arrows on the first level keys$SEP$# We have a compact hook so nothing else to traverse