def METHOD_NAME(coresys):
    """Test if is allow to access for device."""
    disk = Device(
        "sda0",
        Path("/dev/sda0"),
        Path("/sys/bus/usb/001"),
        "block",
        None,
        [],
        {"MAJOR": "5", "MINOR": "10", "ID_FS_LABEL": "hassos-overlay"},
        [],
    )
    assert not coresys.hardware.policy.allowed_for_access(disk)
    device = Device(
        "ttyACM0",
        Path("/dev/ttyACM0"),
        Path("/sys/bus/usb/001"),
        "tty",
        None,
        [],
        {"MAJOR": "204", "MINOR": "10"},
        [],
    )
    assert coresys.hardware.policy.allowed_for_access(device)