code: def install(
      package: str,
      version: str = "",
      upgrade: bool = False,
      ostream: IO = sys.stdout,
      estream: IO = sys.stderr,
  ) -> bool:
      """Install the python package."""
      package = package.replace(" ", "")
      if version:
          package = "{}=={}".format(package, version)
  
      cmd = '{} -m pip install "{}"'.format(sys.executable, package)
  
      if upgrade:
          cmd += " --upgrade"
  
      result, content = subprocess.getstatusoutput(cmd)
      if result:
          estream.write(content)
      else:
          ostream.write(content)
      return result == 0
  
file_path: PaddleHub/paddlehub/utils/pypi.py
imports: import os
  import subprocess
  import sys
  from typing import IO
  from paddlehub.utils.utils import Version
  from paddlehub.utils.io import discard_oe
label_desc: Use image node_id 3 for calling a global function with example usage: install(package, version, upgrade, ostream, estream) and returns: unknown