import re


def _set_docstring_indent_number_to_one(
        docstring: str, indent_num: int) -> str:
    """
    Set the number of indents in docstring to one.

    Parameters
    ----------
    docstring : str
        Target docstring.
    indent_num : int
        Indent's baseline number of the target function.

    Returns
    -------
    docstring : str
        Docstring after adjusting the number of indents.
    """
    if indent_num == 1:
        return docstring
    while indent_num > 1:
        docstring = re.sub(
            pattern=r'^    ', repl='', string=docstring,
            flags=re.MULTILINE)
        indent_num -= 1
    return docstring