code: def update_resources(self, cpu, gpu, **kwargs):
          
          if self.status is Trial.RUNNING:
              raise ValueError("Cannot update resources while Trial is running.")
          self.resources = Resources(cpu, gpu, **kwargs)
docs: EXPERIMENTAL: Updates the resource requirements.
  
          Should only be called when the trial is not running.
  
          Raises:
              ValueError if trial status is running.