code: def test_one_level_deep_flattens(self):
      data = {"flat1": 1, "dict1": {"c": 1, "d": 2}}
  
      result = nested_to_record(data)
      expected = {"dict1.c": 1, "dict1.d": 2, "flat1": 1}
  
      assert result == expected
  
imports: import json
  import numpy
  import pytest
  from pandas import DataFrame, Index, Series, json_normalize
  import pandas._testing
  from pandas.io.json._normalize import nested_to_record
label_desc: Use image node_id 2 for calling the TestNestedToRecord obj's underlying member method code with example usage: obj.test_one_level_deep_flattens() without return types