from typing import List
import glob


def _glob_or_keep(pathname: str) -> List[str]:
    """Use globbing function on pathname, return original if nothing matches."""
    result = glob.glob(pathname)
    if len(result) == 0:
        return [pathname]
    return result