docs: def setup_lookup(apps, lookup_class=TemplateLookup):
      """ Registering template directories of apps to Lookup.
  
      Lookups will be set up as dictionary, app name
      as key and lookup for this app will be it's value.
      Each lookups is correspond to each template directories of apps._lookups.
      The directory should be named 'templates', and put under app directory.
      """
      global _lookups
  
      _lookups = {}
      for app in apps:
          app_template_dir = os.path.join(os.path.dirname(app.__file__),
                                          'templates')
          app_lookup = lookup_class(directories=[app_template_dir],
                                    output_encoding='utf-8',
                                    encoding_errors='replace')
          _lookups[app.__name__] = app_lookup