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
    path = "/sys/bus/i2c/devices/{0}-0050/sfp_is_present"
    port_ps = path.format(self._port_to_i2c_mapping[port_num])
    reg_value = '0'
    try:
        reg_file = open(port_ps)
        reg_value = reg_file.readline().rstrip()
        reg_file.close()
    except IOError as e:
        print("Error: unable to access file: %s" % str(e))
        return False
    if reg_value == '1':
        return True
    return False