from typing import Any
from typing import List


def get_methods(obj: Any, access: str = "all") -> List[str]:
    """
    Return list of names corresponding to class methods of an object `obj`.

    :param obj: class or class object
    :param access: allows to select private, public or all methods of
        the object.
    """
    methods = [method for method in dir(obj) if callable(getattr(obj, method))]
    if access == "all":
        pass
    elif access == "private":
        methods = [method for method in methods if method.startswith("_")]
    elif access == "public":
        methods = [method for method in methods if not method.startswith("_")]
    else:
        raise ValueError("Invalid access='%s'" % access)
    return methods