code: def capped(self, max_templates):
      try:
          was_capped = self.currently_capped
          self.currently_capped = True
          self.marker = max_templates
          yield
      finally:
          self.currently_capped = was_capped
  
imports: import threading
  from contextlib import contextmanager
  from hypothesis.errors import InvalidArgument
  from hypothesis.internal.reflection import get_pretty_function_description
  from hypothesis.internal.validation import check_type
  from hypothesis.strategies._internal.strategies import OneOfStrategy, SearchStrategy, check_strategy
label_desc: Use image node_id 9 for calling the LimitedStrategy obj's underlying member method code with example usage: obj.capped(max_templates) without return types