docs: def compile(self, source, path=None):
          """Compile source to a ready to run template.
  
          :param source:
              The template to compile - should be a unicode string
  
          :return:
              A template function ready to execute
          """
  
          container = self._generate_code(source)
  
          def make_module_name(name, suffix=None):
              output = 'pybars._templates.%s' % name
              if suffix:
                  output += '_%s' % suffix
              return output
  
          if not path:
              path = '_template'
              generate_name = True
          else:
              path = path.replace('\\', '/')
              path = path.replace('/', '_')
              mod_name = make_module_name(path)
              generate_name = mod_name in sys.modules
  
          if generate_name:
              mod_name = make_module_name(path, self.template_counter)
              while mod_name in sys.modules:
                  self.template_counter += 1
                  mod_name = make_module_name(path, self.template_counter)
  
          mod = ModuleType(mod_name)
          filename = '%s.py' % mod_name.replace('pybars.', '').replace('.', '/')
          exec(compile(container.full_code, filename, 'exec', dont_inherit=True), mod.__dict__)
          sys.modules[mod_name] = mod
          linecache.getlines(filename, mod.__dict__)
  
          return mod.__dict__[container.name]