def __init__(self, model_from, context=None):
if isinstance(model_from, string_types):<EOL><INDENT>self._model = yaml_load(model_from)<EOL>self._context = context<EOL><DEDENT>elif isinstance(model_from, dict):<EOL><INDENT>self._context = context<EOL>self._model = model_from<EOL><DEDENT>elif hasattr(model_from, '<STR_LIT>') and callable(model_from.read):<EOL><INDENT>self._context = context<EOL>self._model = yaml_load(model_from)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>
Create a model from the specified content.

        Model can be a string, open file, or dictionary.