code: def publish(args):
      if not os.path.isfile(os.path.expanduser("~/.pypirc")):
          print(
              unindent(
                  """
              Missing ~/.pypirc file. Should look like:
              -----------------------------------------
  
                  [distutils]
                  index-servers =
                      pypi
  
                  [pypi]
                  username:your_username
                  password:your_password
  
          """
              )
          )
          sys.exit(-1)
  
      ### Upload everything to server
      shell(
          """
          cd {build_dir}/pyqtgraph
          
          # Uploading documentation..  (disabled; now hosted by readthedocs.io)
          #rsync -rv doc/build/* pyqtgraph.org:/www/code/pyqtgraph/pyqtgraph/documentation/build/
  
          # Uploading release packages to website
          rsync -v {pkg_dir} pyqtgraph.org:/www/code/pyqtgraph/downloads/
  
          # Push master to github
          git push https://github.com/pyqtgraph/pyqtgraph master:master
          
          # Push tag to github
          git push https://github.com/pyqtgraph/pyqtgraph pyqtgraph-{version}
  
          # Upload to pypi..
          python setup.py sdist upload
  
      """.format(
              **args.__dict__
          )
      )
  
      print(
          unindent(
              """
  
      ======== Upload complete. =========
  
      Next steps to publish:
          - update website
          - mailing list announcement
          - new conda recipe (http://conda.pydata.org/docs/build.html)
          - contact deb maintainer (gianfranco costamagna)
          - other package maintainers?
  
      """
          ).format(**args.__dict__)
      )
  
imports: import os, sys, argparse, random
  from shell import shell, ssh
label_desc: Use image node_id 2 for calling a global function with example usage: publish(args) without return types