def import_finder(dotted_path):
 try:
  finder_module = import_module(dotted_path)
  return finder_module.find_embed
 except ImportError as e:
  try:
   return import_string(dotted_path)
  except ImportError:
   six.reraise(ImportError, e, sys.exc_info()[2])

def import_finder ( dotted_path ) : try : finder_module = import_module ( dotted_path ) return finder_module . find_embed except ImportError as e : try : return import_string ( dotted_path ) except ImportError : six . reraise ( ImportError , e , sys . exc_info ( ) [ 2 ] )
imports a finder function from a dotted path .