def pixel2idx(self, pixel: str) -> int:
    bin_rep = pixel.replace('#', '1').replace('.', '0')
    return int(bin_rep, base=2)
def pixel2idx(self, pixel: str) -> int:
    bin_rep = pixel.replace('#', '1').replace('.', '0')
    return int(bin_rep, base=2)