code: def fetch_section_data(self, context, name):
          
          data = self.resolve_context(context, name)
  
          # From the spec:
          #
          #   If the data is not of a list type, it is coerced into a list
          #   as follows: if the data is truthy (e.g. `!!data == true`),
          #   use a single-element list containing the data, otherwise use
          #   an empty list.
          #
          if not data:
              data = []
          else:
              # The least brittle way to determine whether something
              # supports iteration is by trying to call iter() on it:
              #
              #   http://docs.python.org/library/functions.html#iter
              #
              # It is not sufficient, for example, to check whether the item
              # implements __iter__ () (the iteration protocol).  There is
              # also __getitem__() (the sequence protocol).  In Python 2,
              # strings do not implement __iter__(), but in Python 3 they do.
              try:
                  iter(data)
              except TypeError:
                  # Then the value does not support iteration.
                  data = [data]
              else:
                  if is_string(data) or isinstance(data, dict):
                      # Do not treat strings and dicts (which are iterable) as lists.
                      data = [data]
                  # Otherwise, treat the value as a list.
  
          return data
docs: Fetch the value of a section as a list.