code: def __init__(self, file=None):
      default_netrc = file is None
      if file is None:
          file = os.path.join(os.path.expanduser("~"), ".netrc")
      self.hosts = {}
      self.macros = {}
      try:
          with open(file, encoding="utf-8") as fp:
              self._parse(file, fp, default_netrc)
      except UnicodeDecodeError:
          with open(file, encoding="locale") as fp:
              self._parse(file, fp, default_netrc)
  
file_path: catboost/contrib/tools/python3/src/Lib/netrc.py
imports: import os, shlex, stat
label_desc: Use image node_id 1 to create a new netrc object  with example: obj = netrc(file)