def get_field_verbose_name(field):
    '\n    Get the verbose name of the field.\n    If the field has a ``help_text``, it is also included.\n\n    In case the field is a related field, the ``related_name`` is used to link to the remote model.\n    For reverse related fields, the originating field is linked.\n\n    :param field: The field\n    :type field: ~django.db.models.Field\n    '
    help_text = ''
    if isinstance(field, models.fields.reverse_related.ForeignObjectRel):
        related_name = (field.related_name.replace('_', ' ') if field.related_name else None)
        if isinstance(field, models.fields.reverse_related.OneToOneRel):
            related_name = (related_name or field.remote_field.model._meta.verbose_name)
            verbose_name = f'The {related_name} of this {field.model._meta.verbose_name}'
        else:
            related_name = (related_name or field.remote_field.model._meta.verbose_name_plural)
            verbose_name = f'All {related_name} of this {field.model._meta.verbose_name}'
        verbose_name += f' (related name of :attr:`~{field.remote_field.model.__module__}.{field.remote_field.model.__name__}.{field.remote_field.name}`)'
    elif isinstance(field, contenttypes.fields.GenericForeignKey):
        return f'Generic foreign key to the :class:`~django.contrib.contenttypes.models.ContentType` specified in :attr:`~{field.model.__module__}.{field.model.__name__}.{field.ct_field}`'
    else:
        primary_key = ('Primary key: ' if field.primary_key else '')
        field_verbose_name = force_str(field.verbose_name)
        verbose_name = ((primary_key + field_verbose_name[:1].upper()) + field_verbose_name[1:])
        help_text = force_str(field.help_text)
    if help_text:
        if (not verbose_name.endswith('.')):
            verbose_name += '. '
        verbose_name += help_text
    if isinstance(field, models.fields.related.RelatedField):
        to = field.remote_field.model
        if isinstance(to, str):
            if ('.' in to):
                to = apps.get_model(to)
            elif (to == 'self'):
                to = field.model
            else:
                to = apps.get_model(field.model._meta.app_label, to)
        if hasattr(field.remote_field, 'related_name'):
            related_name = (field.remote_field.related_name or field.model.__name__.lower())
        verbose_name += f' (related name: :attr:`~{to.__module__}.{to.__name__}.{related_name}`)'
    return verbose_name
Get the verbose name of the field.
If the field has a ``help_text``, it is also included.

In case the field is a related field, the ``related_name`` is used to link to the remote model.
For reverse related fields, the originating field is linked.

:param field: The field
:type field: ~django.db.models.Field
def get_field_verbose_name(field):
    '\n    Get the verbose name of the field.\n    If the field has a ``help_text``, it is also included.\n\n    In case the field is a related field, the ``related_name`` is used to link to the remote model.\n    For reverse related fields, the originating field is linked.\n\n    :param field: The field\n    :type field: ~django.db.models.Field\n    '
    help_text = 
    if isinstance(field, models.fields.reverse_related.ForeignObjectRel):
        related_name = (field.related_name.replace('_', ' ') if field.related_name else None)
        if isinstance(field, models.fields.reverse_related.OneToOneRel):
            related_name = (related_name or field.remote_field.model._meta.verbose_name)
            verbose_name = f'The {related_name} of this {field.model._meta.verbose_name}'
        else:
            related_name = (related_name or field.remote_field.model._meta.verbose_name_plural)
            verbose_name = f'All {related_name} of this {field.model._meta.verbose_name}'
        verbose_name += f' (related name of :attr:`~{field.remote_field.model.__module__}.{field.remote_field.model.__name__}.{field.remote_field.name}`)'
    elif isinstance(field, contenttypes.fields.GenericForeignKey):
        return f'Generic foreign key to the :class:`~django.contrib.contenttypes.models.ContentType` specified in :attr:`~{field.model.__module__}.{field.model.__name__}.{field.ct_field}`'
    else:
        primary_key = ('Primary key: ' if field.primary_key else )
        field_verbose_name = force_str(field.verbose_name)
        verbose_name = ((primary_key + field_verbose_name[:1].upper()) + field_verbose_name[1:])
        help_text = force_str(field.help_text)
    if help_text:
        if (not verbose_name.endswith('.')):
            verbose_name += '. '
        verbose_name += help_text
    if isinstance(field, models.fields.related.RelatedField):
        to = field.remote_field.model
        if isinstance(to, str):
            if ('.' in to):
                to = apps.get_model(to)
            elif (to == 'self'):
                to = field.model
            else:
                to = apps.get_model(field.model._meta.app_label, to)
        if hasattr(field.remote_field, 'related_name'):
            related_name = (field.remote_field.related_name or field.model.__name__.lower())
        verbose_name += f' (related name: :attr:`~{to.__module__}.{to.__name__}.{related_name}`)'
    return verbose_name