code: def test_profile_formatter(msg):
      profile_formatter = ProfileFormatter()
      record = LogRecord(
          name="record",
          level="level",
          pathname="pathname",
          lineno=1,
          msg=msg,
          args=None,
          exc_info=None,
      )
      format_msg = profile_formatter.format(record)
      if isinstance(msg, str):
          assert format_msg == ""
      else:
          format_dict = json.loads(format_msg)
          assert "created" in format_dict
          assert "process" in format_dict
          assert "module" in format_dict
          assert "thread" in format_dict
          assert "memory" in format_dict
  
imports: import json
  from logging import LogRecord
  import pytest
  from jina.logging.formatter import JsonFormatter, ProfileFormatter
label_desc: Use image node_id 2 for calling a global function with example usage: test_profile_formatter(msg) without return types