code: public static ReportedData getReportedDataFrom(Stanza packet) {
          // Check if the packet includes the DataForm extension
          DataForm dataForm = DataForm.from(packet);
          if (dataForm != null) {
              if (dataForm.getReportedData() != null)
                  return new ReportedData(dataForm);
          }
          // Otherwise return null
          return null;
      }
docs: Returns a new ReportedData if the stanza is used for reporting data and includes an
  extension that matches the elementName and namespace "x","jabber:x:data".
  
  @param packet the stanza used for reporting data.
  @return ReportedData from the packet if present, otherwise null.