code: def run_step(context):
      
      logger.debug("started")
  
      debug = context.get('debug', None)
  
      if debug:
          keys = debug.get('keys', None)
          format = debug.get('format', False)
  
          if keys:
              logger.debug(f"Writing to output: {keys}")
              if isinstance(keys, str):
                  payload = {keys: context[keys]}
              else:
                  payload = {k: context[k] for k in keys}
          else:
              logger.debug(
                  "No keys specified. Writing entire context to output.")
              payload = context
  
          if format:
              payload = context.get_formatted_iterable(payload)
      else:
          payload = context
  
      logger.info(f'\n{json.dumps(payload, indent=2, ensure_ascii=False)}')
  
      logger.debug("done")
docs: Print debug info to console.
  
      context is a dictionary or dictionary-like.
  
      If you use pypyr.steps.debug as a simple step (i.e you do NOT specify the
      debug input context), it will just dump the entire context to stdout.
  
      Configure the debug step with the following optional context item:
          debug:
              keys: str (for single key) or list (of str keys). Only dump the
                    specified keys.
              format: bool. Defaults False. Applies formatting expressions on
                      dump.