def METHOD_NAME(self, port_num):
    if port_num in self.qsfp_ports:
        bit_mask = port_num % 8
    else:
        return False
    try:
        reg_file = open("/sys/bus/i2c/devices/4-0032/qsfp_lpmode")
    except IOError as e:
        print("Error: unable to open file: %s" % str(e))
    content = reg_file.readline().rstrip()
    reg_value = int(content, 16)
    reg_file.close()
    if reg_value & (1 << bit_mask) == 0:
        return False
    return True