<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _improve_method_docs(obj, name, lines):
 """Improve the documentation of various methods. :param obj: the instance of the method to document. :param name: full dotted path to the object. :param lines: expected documentation lines. """

    if not lines:
        # Not doing obj.__module__ lookups to avoid performance issues.
        if name.endswith('_display'):
            match = RE_GET_FOO_DISPLAY.search(name)
            if match is not None:
                # Django get_..._display method
                lines.append("**Autogenerated:** Shows the label of the :attr:`{field}`".format(
                    field=match.group('field')
                ))
        elif '.get_next_by_' in name:
            match = RE_GET_NEXT_BY.search(name)
            if match is not None:
                lines.append("**Autogenerated:** Finds next instance"
                             " based on :attr:`{field}`.".format(
                                 field=match.group('field')
                             ))
        elif '.get_previous_by_' in name:
            match = RE_GET_PREVIOUS_BY.search(name)
            if match is not None:
                lines.append("**Autogenerated:** Finds previous instance"
                             " based on :attr:`{field}`.".format(
                                 field=match.group('field')
                             ))