def ascls(maybe_cls):
    """Sometimes code wants the class but is given an object. ascls just takes that small piece of logic and provides
    a clean method call to ensure the code is working on a class not an instance.


    :param Any maybe_cls:
    :return: Type
    """
    cls = maybe_cls
    if not isinstance(maybe_cls, type):
        cls = maybe_cls.__class__
    return cls