code: def run_command(command, env):
      
      # copy the current environment variables and add the vales from
      # `env`
      cmd_env = os.environ.copy()
      cmd_env.update(env)
  
      p = Popen(command,
                universal_newlines=True,
                bufsize=0,
                shell=False,
                env=cmd_env)
      _, _ = p.communicate()
  
      return p.returncode
docs: Run command in sub process.
  
      Runs the command in a sub process with the variables from `env`
      added in the current environment variables.
  
      Parameters
      ----------
      command: List[str]
          The command and it's parameters
      env: Dict
          The additional environment variables
  
      Returns
      -------
      int
          The return code of the command