code: def main(*args):
      
      try:
          subprocess.check_call([sys.executable, '-m', 'pip'] + list(args))
          return 0
      except subprocess.CalledProcessError as err:
          return err.returncode
docs: Invoke pip in a subprocess, with semantics very similar to `pip.main()`
  
      Why use check_call instead of check_output?
      It's behavior is slightly closer to the older `pip.main()` behavior,
      printing output information directly to stdout.
  
      check_call was added in py2.5 and is supported through py3.x , so it's more
      compatible than some alternatives like subprocess.run (added in py3.5)