docs: def main(command_line_args=None):
      '''Connor entry point. See help for more info'''
      log = None
      if not command_line_args:
          command_line_args = sys.argv
      try:
          start_time = time.time()
          args = parse_command_line_args(command_line_args)
          log = utils.Logger(args)
          command_validator.preflight(args, log)
          log.info('connor begins (v{})', __version__)
          log.info('logging to [{}]', args.log_file)
          utils.log_environment_info(log, args)
          bam_tags = bamtag.build_bam_tags()
          base_annotated_writer = writers.build_writer(args.input_bam,
                                                        args.annotated_output_bam,
                                                        bam_tags,
                                                        args)
          sort_filter_by_name = args.filter_order == 'name'
          annotated_writer = writers.LoggingWriter(base_annotated_writer,
                                                   log,
                                                   sort_filter_by_name)
          consensus_writer = writers.build_writer(args.input_bam,
                                                   args.output_bam,
                                                   bam_tags,
                                                   args)
          _dedup_alignments(args, consensus_writer, annotated_writer, log)
          annotated_writer.close(log)
          consensus_writer.close(log)
          warning = ' **See warnings above**' if log.warning_occurred else ''
          elapsed_time = int(time.time() - start_time)
          log.info("connor complete ({} seconds, {}mb peak memory).{}",
               elapsed_time,
               utils.peak_memory(),
               warning)
      except utils.UsageError as usage_error:
          message = "connor usage problem: {}".format(str(usage_error))
          print(message, file=sys.stderr)
          print("See 'connor --help'.", file=sys.stderr)
          sys.exit(1)
      except Exception: #pylint: disable=broad-except
          if log:
              show = log.error
          else:
              show = partial(print, file=sys.stderr)
          show("An unexpected error occurred")
          show(traceback.format_exc())
          exit(1)