import inspect


def is_static_method(klass, name: str) -> bool:
    """
    Check if the attribute of the passed `klass`
    is a `@staticmethod`.

    Arguments:
        klass: Class object or instance to check for the attribute on.
        name: Name of the attribute to check for.

    Returns:
        `True` if the method is a staticmethod, else `False`.
    """
    if not inspect.isclass(klass):
        klass = klass.__class__

    meth = getattr(klass, name)

    if inspect.isfunction(meth):
        if getattr(meth, "__self__", None):
            return False

    for cls in klass.__mro__:
        descriptor = vars(cls).get(name)
        if descriptor is not None:
            return isinstance(descriptor, staticmethod)

    return False