def obj_or_import_string(value, default=None):
if isinstance(value, six.string_types):<EOL><INDENT>return import_string(value)<EOL><DEDENT>elif value:<EOL><INDENT>return value<EOL><DEDENT>return default<EOL>
Import string or return object.