code: def autodetect(self):
          
          # Convert SNMP_MAPPER to a list and sort by priority
          snmp_mapper_list = []
          for k, v in SNMP_MAPPER.items():
              snmp_mapper_list.append({k: v})
          snmp_mapper_list = sorted(
              snmp_mapper_list, key=lambda x: list(x.values())[0]["priority"]
          )
          snmp_mapper_list.reverse()
  
          for entry in snmp_mapper_list:
              for device_type, v in entry.items():
                  oid = v["oid"]
                  regex = v["expr"]
  
              # Used cache data if we already queryied this OID
              if self._response_cache.get(oid):
                  snmp_response = self._response_cache.get(oid)
              else:
                  snmp_response = self._get_snmp(oid)
                  self._response_cache[oid] = snmp_response
  
              # See if we had a match
              if re.search(regex, snmp_response):
                  return device_type
  
          return None
docs: Try to guess the device_type using SNMP GET based on the SNMP_MAPPER dict. The type which
          is returned is directly matching the name in *netmiko.ssh_dispatcher.CLASS_MAPPER_BASE*
          dict.
  
          Thus you can use this name to retrieve automatically the right ConnectionClass
  
          Returns
          -------
          potential_type : str
              The name of the device_type that must be running.