docs: def get_all_resource_attributes_in_network(attr_id, network_id, **kwargs):
      """
          Find every resource attribute in the network matching the supplied attr_id
      """
  
      user_id = kwargs.get('user_id')
  
      try:
          a = db.DBSession.query(Attr).filter(Attr.id == attr_id).one()
      except NoResultFound:
          raise HydraError("Attribute %s not found"%(attr_id,))
  
      ra_qry = db.DBSession.query(ResourceAttr).filter(
                  ResourceAttr.attr_id==attr_id,
                  or_(Network.id == network_id,
                  Node.network_id==network_id,
                  Link.network_id==network_id,
                  ResourceGroup.network_id==network_id)
              ).outerjoin('node')\
               .outerjoin('link')\
               .outerjoin('network')\
               .outerjoin('resourcegroup')\
               .options(joinedload_all('node'))\
               .options(joinedload_all('link'))\
               .options(joinedload_all('resourcegroup'))\
               .options(joinedload_all('network'))
  
      resourceattrs = ra_qry.all()
  
      json_ra = []
      #Load the metadata too
      for ra in resourceattrs:
          ra_j = JSONObject(ra, extras={'node':JSONObject(ra.node) if ra.node else None,
                                                 'link':JSONObject(ra.link) if ra.link else None,
                                                 'resourcegroup':JSONObject(ra.resourcegroup) if ra.resourcegroup else None,
                                                 'network':JSONObject(ra.network) if ra.network else None})
          
          if ra_j.node is not None:
              ra_j.resource = ra_j.node
          elif ra_j.link is not None:
              ra_j.resource = ra_j.link
          elif ra_j.resourcegroup is not None:
              ra_j.resource = ra_j.resourcegroup
          elif ra.network is not None:
              ra_j.resource = ra_j.network
          
          json_ra.append(ra_j)
  
      return json_ra