code: def as_flat_dict(self):
          
          flat_params = {}
          def recurse(parameters, path):
              for key, value in parameters.items():
                  newpath = path + [key]
                  if isinstance(value, dict):
                      recurse(value, newpath)
                  else:
                      flat_params['.'.join(newpath)] = value
  
          recurse(self.params, [])
          return flat_params
docs: Returns the parameters of a flat dictionary from keys to values.
          Nested structure is collapsed with periods.