text: import argparse
  import sys
  
  from sort_compare.sort import SortCompare, SortResultsGraph
  
  
  def main() -> None:
      """Compare the performance of different sorting algorithms
      implemented in Python.
      """
      try:
          parser = argparse.ArgumentParser(
              description="Compare the performance of different sorting "
              "algorithms implemented in Python.",
              formatter_class=argparse.MetavarTypeHelpFormatter,
          )
  
          parser.add_argument(
              "algorithms", type=str, nargs="+", help="algorithms to compare"
          )
          parser.add_argument(
              "-l",
              "--length",
              type=int,
              nargs="+",
              default=[1000, 2000, 3000, 4000, 5000],
              help="the number and size of each list to compare "
              "(default: [1000, 2000, 3000, 4000, 5000])",
          )
          parser.add_argument(
              "-t",
              "--title",
              type=str,
              default="Sort Algorithm Comparison",
              help="title of the graph "
              "(default: 'Sorting Algorithm Comparison')",
          )
          parser.add_argument(
              "-s",
              "--style",
              type=SortResultsGraph.find_style,
              metavar="str",
              default="default",
              help="style of the matplotlib.pyplot graph (default: 'default')",
          )
  
          args = parser.parse_args()
  
          sorter = SortCompare(args.algorithms, list_lengths=args.length)
          results_dict = sorter.compare()
  
          graph = SortResultsGraph(
              results_dict, title=args.title, style=args.style
          )
          graph.draw_graph()
  
      except Exception as e:
          print(str(e))
          sys.exit(2)
  
  
  if __name__ == "__main__":
      main()
  