code: def element_name_and_type_by_href(href):
      
      if href:
          element = fetch_json_by_href(href)
          if element.json:
              for entries in element.json.get('link'):
                  if entries.get('rel') == 'self':
                      typeof = entries.get('type')
  
              return (element.json.get('name'),
                      typeof)
docs: Retrieve the element name and type of element based on the href.
      You may have a href that is within another element reference and
      want more information on that reference.
  
      :param str href: href of element
      :return: tuple (name, type)