code: def to_dict(self, copy=False):
          
          new_dict = {}
          for attr, value in self:
              if copy:
                  value = deepcopy(value)
              new_dict[attr] = value
  
          return new_dict
docs: Convert the struct to a dictionary.
  
          If `copy == True`, returns a deep copy of the values.