def METHOD_NAME(self, port_num, lpmode):
    if port_num not in self.qsfp_ports:
        return False
    lowpower_path = '/sys/bus/i2c/devices/8-0076/sfp'+str(port_num+1)+'_lowpower'
    # LPMode is active high; set or clear the bit accordingly
    if lpmode is True:
        value = 1
    else:
        value = 0
    try:
        file = open(lowpower_path, "r+")
    except IOError as e:
        print("Error: unable to open file: %s" % str(e))
        return False
    file.seek(0)
    file.write(str(value))
    file.close()
    return True