code: def _upload_dists(self, repo, dists):
          
  
          from twine.commands.upload import upload
  
          if 'PYPI_USER' in os.environ and 'PYPI_PASS' in os.environ:
              pypi_user = os.environ['PYPI_USER']
              pypi_pass = os.environ['PYPI_PASS']
          else:
              pypi_user = None
              pypi_pass = None
  
          # Invoke upload this way since subprocess call of twine cli has cross platform issues
          upload(dists, repo, False, None, pypi_user, pypi_pass, None, None, '~/.pypirc', False, None, None, None)
docs: Upload a given component to pypi
  
          The pypi username and password must either be specified in a ~/.pypirc
          file or in environment variables PYPI_USER and PYPI_PASS