def perform_import(val, setting_name):
 if isinstance(val, six.string_types):
  return import_from_string(val, setting_name)
 elif isinstance(val, (list, tuple)):
  return [import_from_string(item, setting_name) for item in val]
 return val

def perform_import ( val , setting_name ) : if isinstance ( val , six . string_types ) : return import_from_string ( val , setting_name ) elif isinstance ( val , ( list , tuple ) ) : return [ import_from_string ( item , setting_name ) for item in val ] return val
if the given setting is a string import notation .