def _load(self, config):
if isinstance(config, six.string_types):<EOL><INDENT>try:<EOL><INDENT>config = json.loads(config)<EOL><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>if not isinstance(config, dict):<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>return config<EOL>
Loads config from string or dict