'Helper function converts from string or int to the underlying int'

@classmethod
def get_activity_int(cls, activity_type):

    if (type(activity_type).__name__ in ['str', 'unicode']):
        if (activity_type in cls.KNOWN_TYPES):
            return cls.KNOWN_TYPES[activity_type]
        else:
            raise Exception(('Unrecognized    activity    type:    %s' % activity_type))
    elif isnumeric(activity_type):
        return int(activity_type)
    else:
        raise Exception('Cannot    convert    requested    activity_type    to    int')
