def load_transforms(transforms):
from . import Transform<EOL>import inspect<EOL>transforms_with_argv = map(lambda t: (t[<NUM_LIT:0>], t[<NUM_LIT:1>:]) if isinstance(t, list) else (t, []),<EOL>transforms)<EOL>def instantiate_transform(module_name, argv):<EOL><INDENT>tr_module = __import__(<EOL>module_name if module_name.count('<STR_LIT:.>') > <NUM_LIT:0> else TRANSFORM_MODULE_PREFIX + module_name,<EOL>fromlist=['<STR_LIT>'])<EOL>tr_classes = inspect.getmembers(<EOL>tr_module,<EOL>lambda c: issubclass(c if inspect.isclass(c) else None.__class__,<EOL>Transform))<EOL>if len(tr_classes) != <NUM_LIT:1>:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>tr_class = tr_classes[<NUM_LIT:0>]<EOL>return tr_class[<NUM_LIT:1>](argv)<EOL><DEDENT>return [instantiate_transform(tr[<NUM_LIT:0>], tr[<NUM_LIT:1>])<EOL>for tr in transforms_with_argv]<EOL>
Load transform modules and return instance of transform class.

Parameters
----------
transforms : [str] or [[str]]
    array of transform module name,
    or nested array of transform module name with argv to load

Returns
-------
    array of transform instance