import pathlib


def check_rdma() -> bool:
    """Check if rdma is possible in this node.

    Returns:
        bool: true if rdma possible

    """
    try:
        p = pathlib.Path("/dev/infiniband")
        verb_file_list = [x for x in p.iterdir() if "uverb" in p.name]
    except FileNotFoundError:
        return False

    use_rdma = len(verb_file_list) == 2
    return use_rdma