class_docstr: UnmanagedTrialHeartbeat updates the state on context enter/exit.
code: def _update_state(self, state: bindings.trialv1State) -> None:
      body = bindings.v1PatchTrialRequest(
          trialId=self._trial_id, state=state
      )
      bindings.patch_PatchTrial(
          session=self._session, body=body, trialId=self._trial_id
      )
  
imports: import atexit
  import logging
  import sys
  import threading
  import time
  import types
  from typing import Any, Optional, Union
  from determined.common import api
  from determined.common.api import bindings
label_desc: Use image node_id 2 for calling the _UnmanagedTrialHeartbeat obj's underlying member method code with example usage: obj._update_state(state) without return types