code: def check_environment_temperature(the_session, the_helper, the_snmp_value, the_unit=1):
      
  
      a_snmp_unit = snmpSessionBaseClass.get_data(
          the_session,
          apc_oid_environment_temperature_unit,
          the_helper)
      snmp_units = {
          '1' : 'C',
          '2' : 'F'
          }
      a_unit = snmp_units.get(a_snmp_unit, 'UNKNOWN_UNIT')
  
      the_helper.add_metric(
          label=the_helper.options.type,
          value=the_snmp_value,
          warn=the_helper.options.warning,
          crit=the_helper.options.critical,
          uom=a_unit)
  
      the_helper.check_all_metrics()
      the_helper.set_summary("Current environmental temperature is {}{}".format(the_snmp_value, a_unit))
docs: OID .1.3.6.1.4.1.318.1.1.10.2.3.2.1.4.1
      MIB Excerpt
      The current temperature reading from the probe displayed
      in the units shown in the 'iemStatusProbeTempUnits' OID
      (Celsius or Fahrenheit).
  
      Description of unit OID
      OID .1.3.6.1.4.1.318.1.1.10.2.3.2.1.5
      The temperature scale used to display the temperature
      thresholds of the probe, Celsius(1) or Fahrenheit(2).
      This setting is based on the system preferences
      configuration in the agent.