code: def test_geo_interface(self):
      class Thingy:
          def __init__(self, id, title, x, y):
              self.id = id
              self.title = title
              self.x = x
              self.y = y
  
          @property
          def __geo_interface__(self):
              return {
                  "id": self.id,
                  "properties": {"title": self.title},
                  "geometry": {
                      "type": "Point",
                      "coordinates": (self.x, self.y),
                  },
              }
  
      ob = Thingy("1", "thingy one", -106.0, 40.0)
      self.assertEqual(
          geojson.dumps(
              ob.__geo_interface__["geometry"], sort_keys=True
          ),
          '{"coordinates": [-106.0, 40.0], "type": "Point"}',
      )
      self.assertEqual(
          geojson.dumps(ob, sort_keys=True),
          (
              '{"geometry": {"coordinates": [-106.0, 40.0],'
              ' "type": "Point"},'
              ' "id": "1",'
              ' "properties": {"title": "thingy one"}}'
          ),
      )
  
file_path: geojson/tests/test_features.py
imports: from io import StringIO
  import unittest
  import geojson
label_desc: Use image node_id 4 for calling the FeaturesTest obj's underlying member method code with example usage: obj.test_geo_interface() and returns: dict