def METHOD_NAME(cls, path: PathLike) -> t.List[Path]:
    """
    Search all virtual environments under the path.
    Args:
        path: the path to be searched
    Returns: a list of virtual environments or conda environments
    """
    envs = []
    for root, dirs, files in os.walk(path):
        if cls._check_if_is_py_env(root):
            envs.append(Path(root))
    return envs