def __call__(cls, *args, **kwargs):
if not args:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>systemConfig = args[<NUM_LIT:0>]<EOL>obj = cls.__new__(cls)<EOL>with warnings.catch_warnings():<EOL><INDENT>warnings.simplefilter('<STR_LIT:ignore>')<EOL>for key in obj.initMap:<EOL><INDENT>if (key not in systemConfig) and obj.initMap[key][<NUM_LIT:0>]:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(cls.__name__, key))<EOL><DEDENT>if key in systemConfig:<EOL><INDENT>if obj.initMap[key][<NUM_LIT:2>] is None:<EOL><INDENT>def typer (x):<EOL><INDENT>return x<EOL><DEDENT><DEDENT>else:<EOL><INDENT>def typer(x):<EOL><INDENT>newtype = obj.initMap[key][<NUM_LIT:2>]<EOL>try:<EOL><INDENT>return obj.initMap[key][<NUM_LIT:2>](x)<EOL><DEDENT>except TypeError:<EOL><INDENT>if np.iscomplex(x) and issubclass(newtype, np.floating):<EOL><INDENT>return typer(x.real)<EOL><DEDENT>raise<EOL><DEDENT><DEDENT><DEDENT>if obj.initMap[key][<NUM_LIT:1>] is None:<EOL><INDENT>setattr(obj, key, typer(systemConfig[key]))<EOL><DEDENT>else:<EOL><INDENT>setattr(obj, obj.initMap[key][<NUM_LIT:1>], typer(systemConfig[key]))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>obj.__init__(*args, **kwargs)<EOL>return obj<EOL>
Instantiate a subsclass of AttributeMapper