docs: def _setup(self):
          """Setup the layer two agent."""
          agent_config = CONF.get("AGENT", {})
          self._worker_count = agent_config.get('worker_count')
          self._phys_net_map = agent_config.get(
              'physical_network_vswitch_mappings', [])
          self._local_network_vswitch = agent_config.get(
              'local_network_vswitch')
          self._load_physical_network_mappings(self._phys_net_map)
          self._validate_vswitches()
  
          self._endpoints.append(self)
          self._event_callback_pairs.extend([
              (self._utils.EVENT_TYPE_CREATE, self._process_added_port_event),
              (self._utils.EVENT_TYPE_DELETE, self._process_removed_port_event)
          ])
  
          tpool.set_num_threads(self._worker_count)