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
    cpld_i = self.get_cpld_num(port_num)
    cpld_ps = self._cpld_mapping[cpld_i]
    path = "/sys/bus/i2c/devices/{0}/module_present_{1}"
    port_ps = path.format(cpld_ps, port_num)
    content = "0"
    try:
        val_file = open(port_ps)
        content = val_file.readline().rstrip()
        val_file.close()
    except IOError as e:
        print("Error: unable to access file: %s" % str(e))
        return False
    if content == "1":
        return True
    return False