from typing import List
import inspect


def get_function_names(m_or_cls: object) -> List[str]:
    """Get function/method names within a module or class."""
    ans = []
    for m in inspect.getmembers(m_or_cls):
        if inspect.isroutine(m[1]):
            ans.append(m[0])
    ans.sort()
    return ans