def get_stub(self, service_name):
    if not self._activated:
      raise NotActivatedError('The testbed is not activated.')
    if service_name not in SUPPORTED_SERVICES:
      msg = 'The "%s" service is not supported by testbed' % service_name
      raise StubNotSupportedError(msg)
    if service_name not in self._enabled_stubs:
      return None
    return self._test_stub_map.GetStub(service_name)
Test the longest common substring function.
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/ext/testbed/__init__.py/Testbed.get_stub--crossover with--dataset/ETHPy150Open gmcquillan/firetower/tests/test_classifier.py/TestClassfier.test_lcs