code: def to_dictionary(self):
          
  
          j = {}
          for p in self.properties:
              j[p] = getattr(self, p)
  
          return j
docs: Serialize an object into dictionary form.  Useful if you have to
          serialize an array of objects into JSON.  Otherwise, if you call the
          :meth:`to_json` method on each object in the list and then try to
          dump the array, you end up with an array with one string.