def METHOD_NAME(self, port_num):
    # Check for invalid port_num
    if port_num < self.port_start or port_num > self.port_end:
        return False
    if port_num < self.SFP_PORT_START :
        return False
    port_num -= self.SFP_PORT_START
    try:
        sfp_modprs_path = "/sys/devices/platform/dell-e3224f-cpld.0/sfp_modprs"
        reg_file = open(sfp_modprs_path)
    except IOError as e:
        print ("Error: unable to open file: %s" % str(e))
        return False
    content = reg_file.readline().rstrip()
    # content is a string containing the hex representation of the register
    reg_value = int(content, 16)
    # Mask off the bit corresponding to our port
    mask = (1 << port_num)
    # ModPrsL is active low
    if (reg_value & mask) == 0:
        return True
    return False