code: def to_dict(self):
          
          dictionary = {}
          for key, value in iteritems(self.__dict__):
              property_name = key[1:]
              if hasattr(self, property_name):
                  dictionary.update({property_name: getattr(self, property_name, None)})
          return dictionary
docs: Return dictionary of object.