def METHOD_NAME(self, bs: bytes, sz: int) -> int:
    return {
            1: lambda x: x[0],
            2: self.unpack16,
            4: self.unpack32,
            8: self.unpack64,
            }.get(sz)(bs)