code: def to_dict(self):
          
          config = {}
          for attr in dir(self):
              if not attr.startswith('_'):
                  value = getattr(self, attr)
                  if not hasattr(value, '__call__'):
                      config[attr] = value
          return config
docs: Convert instance to a serializable mapping.