code: def install_package(self, name, index=None, force=False, update=False):
          
          cmd = 'install'
          if force:
  
              cmd = '{0} {1}'.format(cmd, '--force-reinstall')
  
          if update:
  
              cmd = '{0} {1}'.format(cmd, '--update')
  
          if index:
  
              cmd = '{0} {1}'.format(cmd, '--index-url {0}'.format(index))
  
          self.pip('{0} {1}'.format(cmd, name))
docs: Install a given package.
  
          Args:
              name (str): The package name to install. This can be any valid
                  pip package specification.
              index (str): The URL for a pypi index to use.
              force (bool): For the reinstall of packages during updates.
              update (bool): Update the package if it is out of date.