code: def _ensure_positive_int(x, name, since, min_value=0):
      if not isinstance(x, integer_types):
          note_deprecation(
              "Passing non-integer %s=%r is deprecated" % (name, x),
              since=since,
          )
      x = try_convert(int, x, name)
      if x < min_value:
          raise InvalidArgument(
              "%s=%r must be at least %r." % (name, x, min_value)
          )
      return x
  
imports: from __future__ import absolute_import, division, print_function
  import contextlib
  import datetime
  import inspect
  import threading
  import warnings
  from enum import Enum, IntEnum, unique
  import attr
  from hypothesis.errors import HypothesisDeprecationWarning, InvalidArgument, InvalidState
  from hypothesis.internal.compat import integer_types, quiet_raise, string_types
  from hypothesis.internal.reflection import get_pretty_function_description
  from hypothesis.internal.validation import check_type, try_convert
  from hypothesis.utils.conventions import UniqueIdentifier, not_set
  from hypothesis.utils.dynamicvariables import DynamicVariable
label_desc: Use image node_id 2 for calling a global function with example usage: _ensure_positive_int(x, name, since, min_value) and returns: x