code: def crud_url(instance_or_model, action, prefix=None, additional_kwargs=None):
      
      if additional_kwargs is None:
          additional_kwargs = {}
      if isinstance(instance_or_model, Model):
          additional_kwargs['pk'] = instance_or_model.pk
          model_name = instance_or_model._meta.model
      else:
          model_name = instance_or_model
      return reverse(
          crud_url_name(model_name, action, prefix),
          kwargs=additional_kwargs
      )
docs: Shortcut function returns URL for instance or model and action.
  
      Example::
  
          crud_url(author, 'update')
  
      Is same as:
  
          reverse('testapp_author_update', kwargs={'pk': author.pk})
  
      Example::
  
          crud_url(Author, 'update')
  
      Is same as:
  
          reverse('testapp_author_list')