code: def test_proto_write_partial():
      """Serialize a proto into a partial block."""
      data = dict(this=2, that=4)
      history = wandb_internal_pb2.HistoryRecord()
      for k, v in data.items():
          json_data = json.dumps(v)
          item = history.item.add()
          item.key = k
          item.value_json = json_data
      rec = wandb_internal_pb2.Record()
      rec.history.CopyFrom(history)
  
      wandb._set_internal_process()
      s = datastore.DataStore()
      s.open_for_write(FNAME)
      s.write(rec)
      s.close()
  
file_path: wandb/tests/pytest_tests/unit_tests/test_datastore.py
imports: import json
  import os
  import pytest
  import wandb
  from wandb.proto import wandb_internal_pb2
label_desc: Use image node_id 3 for calling a global function with example usage: test_proto_write_partial() without return types