code: def match_sr(self, svc_ref, cid=None):
          # type: (ServiceReference, Optional[Tuple[str, str]] ) -> bool
          
          with self.__lock:
              our_sr = self.get_reference()
              if our_sr is None:
                  return False
  
              sr_compare = our_sr == svc_ref
              if cid is None:
                  return sr_compare
  
              our_cid = self.get_export_container_id()
              if our_cid is None:
                  return False
  
              return sr_compare and our_cid == cid
docs: Checks if this export registration matches the given service reference
  
          :param svc_ref: A service reference
          :param cid: A container ID
          :return: True if the service matches this export registration