code: def _find_export(self, func):
          # type: (Callable[[Tuple[Any, EndpointDescription]], bool]) -> Optional[Tuple[Any, EndpointDescription]]
          
          with self._exported_instances_lock:
              for val in self._exported_services.values():
                  if func(val):
                      return val
  
              return None
docs: Look for an export using the given lookup method
  
          The lookup method must accept a single parameter, which is a tuple
          containing a service instance and endpoint description.
  
          :param func: A function to look for the excepted export
          :return: The found tuple or None