code: public static Fetch createDefaultAttributeFetch(Attribute attr, String languageCode) {
      Fetch fetch;
      if (isReferenceType(attr)) {
        fetch = new Fetch();
        EntityType refEntityType = attr.getRefEntity();
        String idAttrName = refEntityType.getIdAttribute().getName();
        fetch.field(idAttrName);
  
        String labelAttrName = refEntityType.getLabelAttribute(languageCode).getName();
        if (!labelAttrName.equals(idAttrName)) {
          fetch.field(labelAttrName);
        }
  
        if (attr.getDataType() == FILE) {
          fetch.field(FileMetaMetadata.URL);
        }
      } else {
        fetch = null;
      }
      return fetch;
    }
docs: Create default fetch for the given attribute. For attributes referencing entities the id and
  label value are fetched. Additionally for file entities the URL is fetched. For other
  attributes the default fetch is null;
  
  @return default attribute fetch or null