def METHOD_NAME(basedir: P, rel: str):
    """
    Returns content of file basedir/rel if it exists, None if file not found, or throws an exception
    """
    if not rel:
        raise RuntimeError("Got invalid filename (empty string).")
    if rel[0] == "/":
        full_path = P(rel)
    else:
        full_path = basedir / rel
    if full_path.is_dir():
        raise RuntimeError("Attempted to import a directory")
    if not full_path.is_file():
        return full_path.name, None
    with open(full_path, encoding="utf-8") as f:
        return full_path.name, f.read()