code: def fetch_string(self, context, name):
          
          val = self.resolve_context(context, name)
  
          if callable(val):
              # Return because _render_value() is already a string.
              return self._render_value(val(), context)
  
          if not is_string(val):
              return self.to_str(val)
  
          return val
docs: Get a value from the given context as a basestring instance.