def import_library(taglib_module):
 try:
  mod = import_module(taglib_module)
 except ImportError as e:
  if is_library_missing(taglib_module):
   return None
  else:
   raise InvalidTemplateLibrary(('ImportError raised loading %s: %s' % (taglib_module, e)))
 try:
  return mod.register
 except AttributeError:
  raise InvalidTemplateLibrary(("Template library %s does not have a variable named 'register'" % taglib_module))

def import_library ( taglib_module ) : try : mod = import_module ( taglib_module ) except ImportError as e : if is_library_missing ( taglib_module ) : return None else : raise InvalidTemplateLibrary ( ( 'ImportError raised loading %s: %s' % ( taglib_module , e ) ) ) try : return mod . register except AttributeError : raise InvalidTemplateLibrary ( ( "Template library %s does not have a variable named 'register'" % taglib_module ) )
load a template tag library module .