code: def _write(self, commit=False):
      mutation = gql(
          """
          mutation UpsertBucket( $id: String, $summaryMetrics: JSONString) {
              upsertBucket(input: { id: $id, summaryMetrics: $summaryMetrics}) {
                  bucket { id }
              }
          }
          """
      )
      if commit:
          if self._h5:
              self._h5.close()
              self._h5 = None
          res = self._client.execute(
              mutation,
              variable_values={
                  "id": self._run.storage_id,
                  "summaryMetrics": util.json_dumps_safer(
                      self._json_dict
                  ),
              },
          )
          assert res["upsertBucket"]["bucket"]["id"]
          entity, project, run = self._run.path
          if (
              os.path.exists(self._h5_path)
              and os.path.getmtime(self._h5_path) >= self._started
          ):
              upload_h5(
                  self._h5_path, run, entity=entity, project=project
              )
      else:
          return False
  
imports: import json
  import os
  import time
  from wandb_gql import gql
  import wandb
  from wandb import util
  from wandb.apis.internal import Api
  from wandb.sdk import lib
  from wandb.sdk.data_types.utils import val_to_json
label_desc: Use image node_id 4 for calling the HTTPSummary obj's underlying member method code with example usage: obj._write(commit) and returns: False