import re


def parse_fdisk_sector_size(fdisk_output: str) -> int:
    """Parse sector size in bytes from fdisk output."""
    regexp = r"^Sector size \(logical/physical\): ([0-9]+) bytes / ([0-9]+) bytes"
    match = re.search(regexp, fdisk_output, re.MULTILINE)
    if not match:
        raise ValueError("can't parse partition table sector size")
    if match.group(1) != match.group(2):
        raise ValueError(
            "partition table logical and physical sector sizes differ: %s != %s"
            % (match.group(1), match.group(2))
        )
    return int(match.group(1))