          assert is_simple_callable(ChoiceModel().get_choice_field_display)
  
      def test_type_annotation(self):
          # The annotation will otherwise raise a syntax error in python < 3.5
          locals = {}
          exec("def valid(param: str='value'):  pass", locals)
 
</s> remove from rest_framework.fields import DjangoImageField, is_simple_callable
 </s> add from rest_framework.fields import (
    BuiltinSignatureError, DjangoImageField, is_simple_callable
)
    def test_builtin_function(self):
        # Built-in function signatures are not easily inspectable, so the
        # current expectation is to just raise a helpful error message.
        timestamp = datetime.datetime.now()

        with pytest.raises(BuiltinSignatureError) as exc_info:
            is_simple_callable(timestamp.date)

        assert str(exc_info.value) == (
            'Built-in function signatures are not inspectable. Wrap the '
            'function call in a simple, pure Python function.')

          assert is_simple_callable(ChoiceModel().get_choice_field_display)
  
    def test_builtin_function(self):
        # Built-in function signatures are not easily inspectable, so the
        # current expectation is to just raise a helpful error message.
        timestamp = datetime.datetime.now()

        with pytest.raises(BuiltinSignatureError) as exc_info:
            is_simple_callable(timestamp.date)

        assert str(exc_info.value) == (
            'Built-in function signatures are not inspectable. Wrap the '
            'function call in a simple, pure Python function.')

      def test_type_annotation(self):
          # The annotation will otherwise raise a syntax error in python < 3.5
          locals = {}
          exec("def valid(param: str='value'):  pass", locals)
keep add keep keep keep keep
 Raise exception when field source is a built-in (#6766) 
tests/test_fields.py