docstr: Ensure nested objects that implement __geo_interface__ can be encoded
  into GeoJSON strings
docstr_tok: ["Ensure","nested","objects","that","implement","__geo_interface__","can","be","encoded","into","GeoJSON","strings"]
code: def test_encode_nested(self):
      """
      Ensure nested objects that implement __geo_interface__ can be encoded
      into GeoJSON strings
      """
      actual = geojson.dumps(self.restaurant_feature1, sort_keys=True)
      self.assertEqual(actual, self.restaurant_feature_str)
  
      actual = geojson.dumps(self.restaurant_feature2, sort_keys=True)
      self.assertEqual(actual, self.restaurant_feature_str)
  
file_path: geojson/tests/test_geo_interface.py
imports: import unittest
  import geojson
  from geojson.mapping import to_mapping
label_desc: Use image node_id 3 for calling the EncodingDecodingTest obj's underlying member method code with example usage: obj.test_encode_nested() without return types