from typing import ByteString


def common_prefix(label: ByteString, other_label: ByteString) -> ByteString:
    """ Get the common prefix of label and other_label. """
    buffer = bytearray()
    if not label or not other_label: return buffer
    for (a,b) in zip(label, other_label):
        if a == b: buffer.append(a)
        else: break
    return buffer