code: def parse_args(argv=None):
      """Parses CLI arguments.
  
      Args:
          argv: optional list of arguments to parse. sys.argv is used by default.
  
      Raises:
          DvcParserError: raised for argument parsing errors.
      """
      from .parser import get_main_parser
  
      parser = get_main_parser()
      args = parser.parse_args(argv)
      args.parser = parser
      return args
  
file_path: dvc/dvc/cli/__init__.py
imports: import logging
  import sys
  from typing import Optional
  from dvc.log import logger
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args(argv) and returns: args