def read_magic_number(path: str) -> bool:
    """Takes path to a file and reads it's first line. If first line is a number and
    number in an interval [1, 3), returns true. Otherwise false.

    Args:
        path: [description]

    Raises:
        ValueError: in case of any error.

    Returns:
        True or False.

    """
    try:
        with open(path) as file:
            line = file.readline().strip()
            return line.isdigit() and 1 <= float(line) < 3
    except Exception:
        raise ValueError("Some error has happened.") from None