      return (cls is not None) and issubclass(cls, APIView)
  
  
  def insert_into(target, keys, value):
      """
      Nested dictionary insertion.
  
      >>> example = {}
 
</s> remove     target[keys[-1]] = value
 </s> add     try:
        target[keys[-1]] = value
    except TypeError:
        msg = INSERT_INTO_COLLISION_FMT.format(
            value_url=value.url,
            target_url=target.url,
            keys=keys
        )
        raise ValueError(msg) </s> remove from rest_framework.viewsets import ModelViewSet
 </s> add from rest_framework.viewsets import GenericViewSet, ModelViewSet

from .models import BasicModel </s> remove from rest_framework.routers import DefaultRouter
 </s> add from rest_framework.routers import DefaultRouter, SimpleRouter </s> remove from rest_framework import filters, pagination, permissions, serializers
 </s> add from rest_framework import (
    filters, generics, pagination, permissions, serializers
)
INSERT_INTO_COLLISION_FMT = """
Schema Naming Collision.

coreapi.Link for URL path {value_url} cannot be inserted into schema.
Position conflicts with coreapi.Link for URL path {target_url}.

Attemped to insert link with keys: {keys}.

Adjust URLs to avoid naming collision or override `SchemaGenerator.get_keys()`
to customise schema structure.
"""


      return (cls is not None) and issubclass(cls, APIView)
  
  
INSERT_INTO_COLLISION_FMT = """
Schema Naming Collision.

coreapi.Link for URL path {value_url} cannot be inserted into schema.
Position conflicts with coreapi.Link for URL path {target_url}.

Attemped to insert link with keys: {keys}.

Adjust URLs to avoid naming collision or override `SchemaGenerator.get_keys()`
to customise schema structure.
"""


  def insert_into(target, keys, value):
      """
      Nested dictionary insertion.
  
      >>> example = {}
keep keep add keep keep keep keep keep
 Fix naming collisions in Schema Generation  (#5464)

* Add failing tests for #4704

* Add generic view based test case.

* Adjust insert_into to raise ValueError 
rest_framework/schemas/generators.py