def METHOD_NAME(
    app: Sphinx, what, name: str, obj: object, options, lines: list[str]
):
    """We do the following things:
    1) Use this method to automatically insert the Keyword Args and "Shortcuts" admonitions
       for the Bot methods.
    2) Use this method to automatically insert "Returned in" admonition into classes
       that are returned from the Bot methods
    3) Use this method to automatically insert "Available in" admonition into classes
       whose instances are available as attributes of other classes
    4) Use this method to automatically insert "Use in" admonition into classes
       whose instances can be used as arguments of the Bot methods
    5) Misuse this autodoc hook to get the file names & line numbers because we have access
       to the actual object here.
    """
    # 1) Insert the Keyword Args and "Shortcuts" admonitions for the Bot methods
    method_name = name.split(".")[-1]
    if (
        name.startswith("telegram.Bot.")
        and what == "method"
        and method_name.islower()
        and check_timeout_and_api_kwargs_presence(obj)
    ):
        insert_index = find_insert_pos_for_kwargs(lines)
        if not insert_index:
            raise ValueError(
                f"Couldn't find the correct position to insert the keyword args for {obj}."
            )
        long_write_timeout = is_write_timeout_20(obj)
        get_updates_sub = 1 if (method_name == "get_updates") else 0
        # The below can be done in 1 line with itertools.chain, but this must be modified in-place
        for i in range(insert_index, insert_index + len(keyword_args)):
            lines.insert(
                i,
                keyword_args[i - insert_index].format(
                    method=method_name,
                    write_timeout=write_timeout_sub[long_write_timeout],
                    read_timeout=read_timeout_sub[get_updates_sub],
                    read_timeout_type=read_timeout_type[get_updates_sub],
                ),
            )
        ADMONITION_INSERTER.insert_admonitions(
            obj=typing.cast(collections.abc.Callable, obj),
            docstring_lines=lines,
        )
    # 2-4) Insert "Returned in", "Available in", "Use in" admonitions into classes
    # (where applicable)
    if what == "class":
        ADMONITION_INSERTER.insert_admonitions(
            obj=typing.cast(type, obj),  # since "what" == class, we know it's not just object
            docstring_lines=lines,
        )
    # 5) Get the file names & line numbers
    # We can't properly handle ordinary attributes.
    # In linkcode_resolve we'll resolve to the `__init__` or module instead
    if what == "attribute":
        return
    # Special casing for properties
    if hasattr(obj, "fget"):
        obj = obj.fget
    # Special casing for filters
    if isinstance(obj, telegram.ext.filters.BaseFilter):
        obj = obj.__class__
    try:
        source_lines, start_line = inspect.getsourcelines(obj)
        end_line = start_line + len(source_lines)
        file = Path(inspect.getsourcefile(obj)).relative_to(FILE_ROOT)
        LINE_NUMBERS[name] = (file, start_line, end_line)
    except Exception:
        pass
    # Since we don't document the `__init__`, we call this manually to have it available for
    # attributes -- see the note above
    if what == "class":
        METHOD_NAME(app, "method", f"{name}.__init__", obj.__init__, options, lines)