<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def element_attribute_by_href(href, attr_name):
 """ The element href is known and you want to retrieve a specific attribute from that element. For example, if you want a specific attribute by it's name:: search.element_attribute_by_href(href_to_resource, 'name') :param str href: href of element :param str attr_name: name of attribute :return: str value of attribute """

    if href:
        element = fetch_json_by_href(href)
        if element.json:
            return element.json.get(attr_name)