code: def from_db_value(cls, value, *_) -> Optional[LocalizedValue]:
          
  
          if not value:
              if getattr(settings, 'LOCALIZED_FIELDS_EXPERIMENTAL', False):
                  return None
              else:
                  return cls.attr_class()
  
          # we can get a list if an aggregation expression was used..
          # if we the expression was flattened when only one key was selected
          # then we don't wrap each value in a localized value, otherwise we do
          if isinstance(value, list):
              result = []
              for inner_val in value:
                  if isinstance(inner_val, dict):
                      if inner_val is None:
                          result.append(None)
                      else:
                          result.append(cls.attr_class(inner_val))
                  else:
                      result.append(inner_val)
  
              return result
  
          # this is for when you select an individual key, it will be string,
          # not a dictionary, we'll give it to you as a flat value, not as a
          # localized value instance
          if not isinstance(value, dict):
              return value
  
          return cls.attr_class(value)
docs: Turns the specified database value into its Python
          equivalent.
  
          Arguments:
              value:
                  The value that is stored in the database and
                  needs to be converted to its Python equivalent.
  
          Returns:
              A :see:LocalizedValue instance containing the
              data extracted from the database.