code: def try_binding(self):
          
          with self._lock:
              if self.reference is not None:
                  # Already bound
                  return
  
              if self._pending_ref is not None:
                  # Get the reference we chose to keep this component valid
                  ref = self._pending_ref
                  self._pending_ref = None
              else:
                  # Get the first matching service
                  ref = self._context.get_service_reference(
                      self.requirement.specification, self.requirement.filter
                  )
  
              if ref is not None:
                  # Found a service
                  self.on_service_arrival(ref)
docs: Searches for the required service if needed
  
          :raise BundleException: Invalid ServiceReference found