code: def finalize_options(self):
      log.warn(
          "Upload_docs command is deprecated. Use Read the Docs "
          "(https://readthedocs.org) instead."
      )
      upload.finalize_options(self)
      if self.upload_dir is None:
          if self.has_sphinx():
              build_sphinx = self.get_finalized_command("build_sphinx")
              self.target_dir = dict(build_sphinx.builder_target_dirs)[
                  "html"
              ]
          else:
              build = self.get_finalized_command("build")
              self.target_dir = os.path.join(build.build_base, "docs")
      else:
          self.ensure_dirname("upload_dir")
          self.target_dir = self.upload_dir
      self.announce("Using upload directory %s" % self.target_dir)
  
imports: from base64 import standard_b64encode
  from distutils import log
  from distutils.errors import DistutilsOptionError
  import os
  import zipfile
  import tempfile
  import shutil
  import itertools
  import functools
  import http.client
  import urllib.parse
  from .._importlib import metadata
  from ..warnings import SetuptoolsDeprecationWarning
  from .upload import upload
label_desc: Use image node_id 3 for calling the upload_docs obj's underlying member method code with example usage: obj.finalize_options() without return types