code: def _models_impl(draw, strat):
      """Handle the nasty part of drawing a value for models()"""
      try:
          return draw(strat)[0]
      except IntegrityError:
          reject()
  
imports: import sys
  import unittest
  from functools import partial
  from typing import TYPE_CHECKING, Optional, Type, TypeVar, Union
  from django import forms, test
  from django.contrib.staticfiles import testing
  from django.core.exceptions import ValidationError
  from django.db import IntegrityError, models
  from hypothesis import reject, strategies
  from hypothesis.errors import InvalidArgument
  from hypothesis.extra.django._fields import from_field
  from hypothesis.strategies._internal.utils import defines_strategy
label_desc: Use image node_id 2 for calling a global function with example usage: _models_impl(draw, strat) and returns: draw