<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _make_attr_element(parent, attr_i):
 """ create an attribute element from an attribute DB object """

    attr = etree.SubElement(parent, "attribute")

    attr_name      = etree.SubElement(attr, 'name')
    attr_name.text = attr_i.name

    attr_desc      = etree.SubElement(attr, 'description')
    attr_desc.text = attr_i.description

    attr_dimension = etree.SubElement(attr, 'dimension')
    attr_dimension.text = units.get_dimension(attr_i.dimension_id, do_accept_dimension_id_none=True).name

    return attr