Generate markdown for Returns section.

    Parameters
    ----------
    thing : function
        Function to produce returns for
    doc : dict
        Dict from numpydoc
    header_level : int
        Number of `#`s to use for header

    Returns
    -------
    list of str
        Markdown for examples section

def returns_section(thing, doc, header_level):
    """
    Generate markdown for Returns section.

    Parameters
    ----------
    thing : function
        Function to produce returns for
    doc : dict
        Dict from numpydoc
    header_level : int
        Number of `#`s to use for header

    Returns
    -------
    list of str
        Markdown for examples section
    """
    lines = []
    return_type = None
    try:
        return_type = thing.__annotations__["return"]
    except AttributeError:
        try:
            return_type = thing.fget.__annotations__["return"]
        except:
            pass
    except KeyError:
        pass
    if return_type is None:
        return_type = ""
    else:
        # print(f"{thing} has annotated return type {return_type}")
        try:
            return_type = (
                f"{return_type.__name__}"
                if return_type.__module__ == "builtins"
                else f"{return_type.__module__}.{return_type.__name__}"
            )
        except AttributeError:
            return_type = str(return_type)
        # print(return_type)

    try:
        if "Returns" in doc and len(doc["Returns"]) > 0 or return_type != "":
            lines.append(f"{'#'*(header_level+1)} Returns\n")
            if return_type != "" and len(doc["Returns"]) == 1:
                name, typ, desc = doc["Returns"][0]
                if typ != "":
                    lines.append(f"- `{name}`: ``{return_type}``")
                else:
                    lines.append(f"- ``{return_type}``")
                lines.append("\n\n")
                if desc != "":
                    lines.append(f"    {' '.join(desc)}\n\n")
            elif return_type != "":
                lines.append(f"- ``{return_type}``")
                lines.append("\n\n")
            else:
                for name, typ, desc in doc["Returns"]:
                    if ":" in name:
                        name, typ = name.split(":")

                    if typ != "":
                        line = f"- `{name}`: {mangle_types(typ)}"
                    else:
                        line = f"- {mangle_types(name)}"
                    line += "\n\n"
                    lines.append(line)
                    lines.append(f"    {' '.join(desc)}\n\n")
    except Exception as e:
        # print(e)
        # print(doc)
        pass
    return lines