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/python/setuptools/py3/setuptools/_distutils/command/upload.py
imports: import os
  import io
  import hashlib
  import logging
  from base64 import standard_b64encode
  from urllib.request import urlopen, Request, HTTPError
  from urllib.parse import urlparse
  from ..errors import DistutilsError, DistutilsOptionError
  from ..core import PyPIRCCommand
  from ..spawn import spawn
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