code: def check_fan(input_fan):
      
      # get a list of all fans      
      fan_data = walk_data(sess, oid_fan, helper)[0]
      
      fan_count = 0
      summary_output = ''
      long_output = ''
  
      for x, fan in enumerate(fan_data, 1):
          fan = int(fan)
          if normal_state[fan] == 'ok':
              # if the fan is ok, we increase the fan_count varaible
              fan_count += 1
          # we always want to the the status in the long output
          long_output += 'Fan %d: %s.\n' % (x, normal_state[fan])
      
      # check we have the correct amount ok fans in OK state, otherwise set status to critical and print the fan in the summary
      if int(fan_count) != int(input_fan):
          summary_output += '%s fan(s) expected - %s fan(s) ok. ' % (input_fan, fan_count)
          helper.status(critical)
      return (summary_output, long_output)
docs: check the fans