code: def get_common_interfaces(self):
      if self._nics is not None:
          return self._nics
  
      nics = None
      if len(self._task_addresses_for_tasks) > 0:
          # in Elastic Horovod on Spark with auto-scaling
          # keys in task_addresses are in range(max_np or proc_num)
          # but not all keys may exist, so we don't do for index in range(proc_num)
          indices = list(self._task_addresses_for_tasks.keys())
          nics = set(self._task_addresses_for_tasks[indices[0]].keys())
          for index in indices[1:]:
              nics.intersection_update(
                  self._task_addresses_for_tasks[index].keys()
              )
  
      if not nics:
          raise Exception(
              "Unable to find a set of common task-to-task communication interfaces: %s"
              % [
                  (index, self._task_addresses_for_tasks[index])
                  for index in self._task_addresses_for_tasks
              ]
          )
  
      return nics
  
imports: import threading
  from horovod.runner.common.service import driver_service
  from horovod.runner.common.util import network
label_desc: Use image node_id 9 for calling the SparkDriverService obj's underlying member method code with example usage: obj.get_common_interfaces() and returns: nics, self