

def _get_call_class(method):
    'Find the call class for method if it exists else create one.'
    (call_base, call_name) = method.split('.', 1)
    mod = __import__('ubersmith.calls.{0}'.format(call_base), fromlist=[''])
    gen = (getattr(mod, x) for x in dir(mod) if (not x.startswith('_')))
    gen = (x for x in call_name if ((type(x) is type) and issubclass(x, BaseCall)))
    for call_class in gen:
        if (call_class.method == method):
            return call_class
    else:

        class GenericCall(BaseCall):
            method = '.'.join((call_base, call_name))
        return GenericCall

dataset/ETHPy150Open jasonkeene/python-ubersmith/ubersmith/calls/__init__.py _get_call_class/VarMisuse@80/125 `gen`->`call_name`