code: def main(args=None):
      
      if args is None:
          args = sys.argv[1:]
  
      parsed_args = get_args(args)
  
      try:
          return pypyr.pipelinerunner.main(
              pipeline_name=parsed_args.pipeline_name,
              pipeline_context_input=parsed_args.pipeline_context,
              working_dir=parsed_args.working_dir,
              log_level=parsed_args.log_level,
              log_path=parsed_args.log_path)
      except KeyboardInterrupt:
          # Shell standard is 128 + signum = 130 (SIGINT = 2)
          sys.stdout.write("\n")
          return 128 + signal.SIGINT
      except Exception as e:
          # stderr and exit code 255
          sys.stderr.write("\n")
          sys.stderr.write(f"\033[91m{type(e).__name__}: {str(e)}\033[0;0m")
          sys.stderr.write("\n")
          # at this point, you're guaranteed to have args and thus log_level
          if parsed_args.log_level < 10:
              # traceback prints to stderr by default
              traceback.print_exc()
  
          return 255
docs: Entry point for pypyr cli.
  
      The setup_py entry_point wraps this in sys.exit already so this effectively
      becomes sys.exit(main()).
      The __main__ entry point similarly wraps sys.exit().