code: def parse_args(argv=None):
      
      parent_parser = get_parent_parser()
  
      # Main parser
      desc = "Data Version Control"
      parser = DvcParser(
          prog="dvc",
          description=desc,
          parents=[parent_parser],
          formatter_class=argparse.RawTextHelpFormatter,
      )
  
      # NOTE: On some python versions action='version' prints to stderr
      # instead of stdout https://bugs.python.org/issue18920
      parser.add_argument(
          "-V",
          "--version",
          action=VersionAction,
          nargs=0,
          help="Show program's version.",
      )
  
      # Sub commands
      subparsers = parser.add_subparsers(
          title="Available Commands",
          metavar="COMMAND",
          dest="cmd",
          help="Use dvc COMMAND --help for command-specific help.",
      )
  
      fix_subparsers(subparsers)
  
      for cmd in COMMANDS:
          cmd.add_parser(subparsers, parent_parser)
  
      args = parser.parse_args(argv)
  
      return args
docs: Parses CLI arguments.
  
      Args:
          argv: optional list of arguments to parse. sys.argv is used by default.
  
      Raises:
          dvc.exceptions.DvcParserError: raised for argument parsing errors.