code: def _CreateInterfaceMapSysfs(self):
      
      interfaces = {}
      for interface in os.listdir('/sys/class/net'):
        try:
          mac_address = open(
              '/sys/class/net/%s/address' % interface).read().strip()
        except (IOError, OSError) as e:
          message = 'Unable to determine MAC address for %s. %s.'
          self.logger.warning(message, interface, str(e))
        else:
          interfaces[mac_address] = interface
      return interfaces
docs: Generate a dictionary mapping MAC address to Ethernet interfaces.
  
      Returns:
        dict, string MAC addresses mapped to the string network interface name.