code: def _heartbeat(self):
      if self.hb_url is not None:
          response = requests.post(
              url=self.hb_url, data="{}", headers=self.headers.copy()
          )
          # Unfortunately, response.json() returns a string that we need
          # to cast to json; however when the request encounters an error
          # the return type is a json blob :/
          if response.status_code == 200:
              return json.loads(response.json()).get(
                  "wait_time_in_seconds"
              )
          else:
              raise HeartBeatException(
                  "HeartBeat request (%s) failed"
                  " (code %s): %s"
                  % (self.hb_url, response.status_code, response.text)
              )
      return None
  
file_path: metaflow/metaflow/metadata/heartbeat.py
imports: import time
  import requests
  import json
  from threading import Thread
  from metaflow.sidecar import MessageTypes, Message
  from metaflow.metaflow_config import SERVICE_HEADERS
  from metaflow.exception import MetaflowException
label_desc: Use image node_id 5 for calling the MetadataHeartBeat obj's underlying member method code with example usage: obj._heartbeat() and returns: None, json