code: def capped(self, max_templates):
      assert not self.currently_capped
      try:
          self.currently_capped = True
          self.marker = max_templates
          yield
      finally:
          self.currently_capped = False
  
imports: from __future__ import absolute_import, division, print_function
  from contextlib import contextmanager
  from hypothesis.errors import InvalidArgument
  from hypothesis.internal.lazyformat import lazyformat
  from hypothesis.internal.reflection import get_pretty_function_description
  from hypothesis.strategies._internal.strategies import OneOfStrategy, SearchStrategy
label_desc: Use image node_id 5 for calling the LimitedStrategy obj's underlying member method code with example usage: obj.capped(max_templates) without return types