code: def with_env_recursive(cmd, **envvars):
      
      from plumbum.commands.base import BoundCommand, BoundEnvCommand
      if isinstance(cmd, BoundCommand):
          cmd.cmd = with_env_recursive(cmd.cmd, **envvars)
      elif isinstance(cmd, BoundEnvCommand):
          cmd.envvars.update(envvars)
          cmd.cmd = with_env_recursive(cmd.cmd, **envvars)
      return cmd
docs: Recursively updates the environment of cmd and all its subcommands.
  
      Args:
          cmd - A plumbum command-like object
          **envvars - The environment variables to update
  
      Returns:
          The updated command.