from typing import Any


def read_file_path(file_path: Any) -> str:
    """Return text read from `file_path`."""
    if not hasattr(file_path, "open"):
        raise RuntimeError(
            "Cannot read `file_path` that doesn't implement `open` method"
        )

    with file_path.open() as f:
        return str(f.read())