def METHOD_NAME(self, data):
    if len(data) < self.HEADER_SIZE:
        return False
    if data[:len(self.MAGIC)] != self.MAGIC:
        return False
    value = struct.unpack('!B', bytes(bytearray([data[12]])))[0]
    self.version = value >> 4
    if self.version != 0x02:
        return False
    self.command = value & ~0x20
    self.local = False
    self.offset = self.HEADER_SIZE
    if self.command == 0x00:
        self.local = True
    elif self.command == 0x01:
        value = struct.unpack('!B', bytes(bytearray([data[13]])))[0]
        self.family = value >> 4
        if self.family == 0x01:
            self.addrSize = 4
        elif self.family == 0x02:
            self.addrSize = 16
        else:
            return False
        self.protocol = value & ~0xF0
        if self.protocol == 0x01:
            self.tcp = True
        elif self.protocol == 0x02:
            self.tcp = False
        else:
            return False
    else:
        return False
    self.contentLen = struct.unpack("!H", data[14:16])[0]
    if not self.local:
        if self.contentLen < (self.addrSize * 2 + self.PORT_SIZE * 2):
            return False
    return True