docs: def _hunt_for_mac(to_find, type_of_thing, net_ok=True):
      # type: (Optional[str], int, bool) -> Optional[str]
      """Tries a variety of methods to get a MAC address.
  
      Format of method lists:
      Tuple:  (regex, regex index, command, command args)
              Command args is a list of strings to attempt to use as arguments
      lambda: Function to call
      """
      if to_find is None:
          log.warning("_hunt_for_mac() failed: to_find is None")
          return None
      if not PY2 and isinstance(to_find, bytes):
          to_find = str(to_find, 'utf-8')
  
      if WINDOWS and type_of_thing == INTERFACE:
          methods = [
              # getmac - Connection Name
              (r'\r\n' + to_find + r'.*' + MAC_RE_DASH + r'.*\r\n',
               0, 'getmac.exe', ['/NH /V']),
  
              # ipconfig
              (to_find + r'(?:\n?[^\n]*){1,8}Physical Address[ .:]+' + MAC_RE_DASH + r'\r\n',
               0, 'ipconfig.exe', ['/all']),
  
              # getmac - Network Adapter (the human-readable name)
              (r'\r\n.*' + to_find + r'.*' + MAC_RE_DASH + r'.*\r\n',
               0, 'getmac.exe', ['/NH /V']),
  
              # wmic - WMI command line utility
              lambda x: _popen('wmic.exe', 'nic where "NetConnectionID = \'%s\'" get '
                                           'MACAddress /value' % x).strip().partition('=')[2],
          ]
      elif (WINDOWS or WSL) and type_of_thing in [IP4, IP6, HOSTNAME]:
          methods = [
              # arp -a - Parsing result with a regex
              (MAC_RE_DASH, 0, 'arp.exe', ['-a %s' % to_find]),
          ]
  
          # Add methods that make network requests
          # Insert it *after* arp.exe since that's probably faster.
          if net_ok and type_of_thing != IP6 and not WSL:
              methods.insert(1, _windows_ctypes_host)
      elif (DARWIN or FREEBSD) and type_of_thing == INTERFACE:
          methods = [
              (r'ether ' + MAC_RE_COLON,
               0, 'ifconfig', [to_find]),
  
              # Alternative match for ifconfig if it fails
              (to_find + r'.*ether ' + MAC_RE_COLON,
               0, 'ifconfig', ['']),
  
              (MAC_RE_COLON,
               0, 'networksetup', ['-getmacaddress %s' % to_find]),
          ]
      elif FREEBSD and type_of_thing in [IP4, IP6, HOSTNAME]:
          methods = [
              (r'\(' + re.escape(to_find) + r'\)\s+at\s+' + MAC_RE_COLON,
               0, 'arp', [to_find])
          ]
      elif OPENBSD and type_of_thing == INTERFACE:
          methods = [
              (r'lladdr ' + MAC_RE_COLON,
               0, 'ifconfig', [to_find]),
          ]
      elif OPENBSD and type_of_thing in [IP4, IP6, HOSTNAME]:
          methods = [
              (re.escape(to_find) + r'[ ]+' + MAC_RE_COLON,
               0, 'arp', ['-an']),
          ]
      elif type_of_thing == INTERFACE:
          methods = [
              _read_sys_iface_file,
              _fcntl_iface,
  
              # Fast modern Ubuntu ifconfig
              (r'ether ' + MAC_RE_COLON,
               0, 'ifconfig', [to_find]),
  
              # Fast ifconfig
              (r'HWaddr ' + MAC_RE_COLON,
               0, 'ifconfig', [to_find]),
  
              # ip link (Don't use 'list' due to SELinux [Android 24+])
              (to_find + r'.*\n.*link/ether ' + MAC_RE_COLON,
               0, 'ip', ['link %s' % to_find, 'link']),
  
              # netstat
              (to_find + r'.*HWaddr ' + MAC_RE_COLON,
               0, 'netstat', ['-iae']),
  
              # More variations of ifconfig
              (to_find + r'.*ether ' + MAC_RE_COLON,
               0, 'ifconfig', ['']),
              (to_find + r'.*HWaddr ' + MAC_RE_COLON,
               0, 'ifconfig', ['', '-a', '-v']),
  
              # Tru64 ('-av')
              (to_find + r'.*Ether ' + MAC_RE_COLON,
               0, 'ifconfig', ['-av']),
              _uuid_lanscan_iface,
          ]
      elif type_of_thing in [IP4, IP6, HOSTNAME]:
          esc = re.escape(to_find)
          methods = [
              _read_arp_file,
              lambda x: _popen('ip', 'neighbor show %s' % x)
              .partition(x)[2].partition('lladdr')[2].strip().split()[0],
  
              (r'\(' + esc + r'\)\s+at\s+' + MAC_RE_COLON,
               0, 'arp', [to_find, '-an', '-an %s' % to_find]),
  
              # Darwin oddness
              (r'\(' + esc + r'\)\s+at\s+' + MAC_RE_DARWIN,
               0, 'arp', [to_find, '-a', '-a %s' % to_find]),
              _uuid_ip,
          ]
      else:
          log.critical("Reached end of _hunt_for_mac() if-else chain!")
          return None
      return _try_methods(methods, to_find)