code: def _make_load_partial(self):
          
          if self.partials is None:
              return self._make_load_template()
  
          # Otherwise, create a function from the custom partial loader.
          partials = self.partials
  
          def load_partial(name):
              # TODO: consider using EAFP here instead.
              #     http://docs.python.org/glossary.html#term-eafp
              #   This would mean requiring that the custom partial loader
              #   raise a KeyError on name not found.
              template = partials.get(name)
              if template is None:
                  raise TemplateNotFoundError("Name %s not found in partials: %s" %
                                              (repr(name), type(partials)))
  
              # RenderEngine requires that the return value be unicode.
              return self._to_unicode_hard(template)
  
          return load_partial
docs: Return a function that loads a partial by name.