docs: def get_mac_address(
          interface=None, ip=None, ip6=None,
          hostname=None, network_request=True
  ):
      # type: (Optional[str], Optional[str], Optional[str], Optional[str], bool) -> Optional[str]
      """Get a Unicast IEEE 802 MAC-48 address from a local interface or remote host.
  
      You must only use one of the first four arguments. If none of the arguments
      are selected, the default network interface for the system will be used.
  
      Exceptions will be handled silently and returned as a None.
      For the time being, it assumes you are using Ethernet.
  
      NOTES:
      * You MUST provide str-typed arguments, REGARDLESS of Python version.
      * localhost/127.0.0.1 will always return '00:00:00:00:00:00'
  
      Args:
          interface (str): Name of a local network interface (e.g "Ethernet 3", "eth0", "ens32")
          ip (str): Canonical dotted decimal IPv4 address of a remote host (e.g 192.168.0.1)
          ip6 (str): Canonical shortened IPv6 address of a remote host (e.g ff02::1:ffe7:7f19)
          hostname (str): DNS hostname of a remote host (e.g "router1.mycorp.com", "localhost")
          network_request (bool): Send a UDP packet to a remote host to populate
          the ARP/NDP tables for IPv4/IPv6. The port this packet is sent to can
          be configured using the module variable `getmac.PORT`.
      Returns:
          Lowercase colon-separated MAC address, or None if one could not be
          found or there was an error.
      """
      if (hostname and hostname == 'localhost') or (ip and ip == '127.0.0.1'):
          return '00:00:00:00:00:00'
  
      # Resolve hostname to an IP address
      if hostname:
          ip = socket.gethostbyname(hostname)
  
      # Populate the ARP table by sending a empty UDP packet to a high port
      if network_request and (ip or ip6):
          try:
              if ip:
                  s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
                  s.sendto(b'', (ip, PORT))
              else:
                  s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
                  s.sendto(b'', (ip6, PORT))
          except Exception:
              log.error("Failed to send ARP table population packet")
              if DEBUG:
                  log.debug(traceback.format_exc())
  
      # Setup the address hunt based on the arguments specified
      if ip6:
          if not socket.has_ipv6:
              log.error("Cannot get the MAC address of a IPv6 host: "
                        "IPv6 is not supported on this system")
              return None
          elif ':' not in ip6:
              log.error("Invalid IPv6 address: %s", ip6)
              return None
          to_find = ip6
          typ = IP6
      elif ip:
          to_find = ip
          typ = IP4
      else:  # Default to searching for interface
          typ = INTERFACE
          if interface:
              to_find = interface
          else:
              # Default to finding MAC of the interface with the default route
              if WINDOWS and network_request:
                  to_find = _fetch_ip_using_dns()
                  typ = IP4
              elif WINDOWS:
                  to_find = 'Ethernet'
              elif BSD:
                  if OPENBSD:
                      to_find = _get_default_iface_openbsd()  # type: ignore
                  else:
                      to_find = _get_default_iface_freebsd()  # type: ignore
                  if not to_find:
                      to_find = 'em0'
              else:
                  to_find = _hunt_linux_default_iface()  # type: ignore
                  if not to_find:
                      to_find = 'en0'
  
      mac = _hunt_for_mac(to_find, typ, network_request)
      log.debug("Raw MAC found: %s", mac)
  
      # Check and format the result to be lowercase, colon-separated
      if mac is not None:
          mac = str(mac)
          if not PY2:  # Strip bytestring conversion artifacts
              mac = mac.replace("b'", '').replace("'", '')\
                       .replace('\\n', '').replace('\\r', '')
          mac = mac.strip().lower().replace(' ', '').replace('-', ':')
  
          # Fix cases where there are no colons
          if ':' not in mac and len(mac) == 12:
              log.debug("Adding colons to MAC %s", mac)
              mac = ':'.join(mac[i:i + 2] for i in range(0, len(mac), 2))
  
          # Pad single-character octets with a leading zero (e.g Darwin's ARP output)
          elif len(mac) < 17:
              log.debug("Length of MAC %s is %d, padding single-character "
                        "octets with zeros", mac, len(mac))
              parts = mac.split(':')
              new_mac = []
              for part in parts:
                  if len(part) == 1:
                      new_mac.append('0' + part)
                  else:
                      new_mac.append(part)
              mac = ':'.join(new_mac)
  
          # MAC address should ALWAYS be 17 characters before being returned
          if len(mac) != 17:
              log.warning("MAC address %s is not 17 characters long!", mac)
              mac = None
          elif mac.count(':') != 5:
              log.warning("MAC address %s is missing ':' characters", mac)
              mac = None
      return mac