code: def load_theme_from_dict(dict_theme):
      
      t = Default()
      for question_type, settings in dict_theme.items():
          if question_type not in vars(t):
              raise ThemeError('Error while parsing theme. Question type '
                               '`{}` not found or not customizable.'
                               .format(question_type))
  
          # calculating fields of namedtuple, hence the filtering
          question_fields = list(filter(lambda x: not x.startswith('_'),
                                        vars(getattr(t, question_type))))
  
          for field, value in settings.items():
              if field not in question_fields:
                  raise ThemeError('Error while parsing theme. Field '
                                   '`{}` invalid for question type `{}`'
                                   .format(field, question_type))
              actual_value = getattr(term, value) or value
              setattr(getattr(t, question_type), field, actual_value)
      return t
docs: Load a theme from a dict.
      Expected format:
      {
          "Question": {
              "mark_color": "yellow",
              "brackets_color": "normal",
              ...
          },
          "List": {
              "selection_color": "bold_blue",
              "selection_cursor": "->"
          }
      }
  
      Color values should be string representing valid blessings.Terminal colors.