def METHOD_NAME(self, index, fan_idx):
    if (index == 1):
        rpm_file = 'fan37_input'
    elif (index == 2):
        rpm_file = 'fan47_input'
    else:
        logging.error("Invalid PSU number:", index)
        return 0
    rpm = self.get_attr_value(self.HWMON_PATH + rpm_file)
    rpm = rpm.rstrip()
    if (rpm != 'ERR'):
        rpm = float(rpm)
    else:
        return 0
    return int(rpm)