<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def attributes_section(thing, doc, header_level):
 """ Generate an attributes section for classes. Prefers type annotations, if they are present. Parameters thing : class Class to document doc : dict Numpydoc output header_level : int Number of `#`s to use for header Returns ------- list of str Markdown formatted attribute list """

    # Get Attributes

    if not inspect.isclass(thing):
        return []

    props, class_doc = _split_props(thing, doc["Attributes"])
    tl = type_list(inspect.signature(thing), class_doc, "\n### Attributes\n\n")
    if len(tl) == 0 and len(props) > 0:
        tl.append("\n### Attributes\n\n")
    for prop in props:
        tl.append(f"- [`{prop}`](#{prop})\n\n")
    return tl