code: def finalize_options(self):
      PyPIRCCommand.finalize_options(self)
      if self.identity and not self.sign:
          raise DistutilsOptionError(
              "Must use --sign for --identity to have meaning"
          )
      config = self._read_pypirc()
      if config != {}:
          self.username = config["username"]
          self.password = config["password"]
          self.repository = config["repository"]
          self.realm = config["realm"]
  
      # getting the password from the distribution
      # if previously set by the register command
      if not self.password and self.distribution.password:
          self.password = self.distribution.password
  
file_path: catboost/contrib/tools/python3/src/Lib/distutils/command/upload.py
imports: import os
  import io
  import hashlib
  from base64 import standard_b64encode
  from urllib.error import HTTPError
  from urllib.request import urlopen, Request
  from urllib.parse import urlparse
  from distutils.errors import DistutilsError, DistutilsOptionError
  from distutils.core import PyPIRCCommand
  from distutils.spawn import spawn
  from distutils import log
label_desc: Use image node_id 2 for calling the upload obj's underlying member method code with example usage: obj.finalize_options() without return types