code: public static ConfigureForm getFormFromPacket(Stanza packet, PubSubElementType elem) {
          FormNode config = packet.getExtension(elem.getElementName(), elem.getNamespace().getXmlns());
          Form formReply = config.getForm();
          return new ConfigureForm(formReply);
      }
docs: Get a {@link ConfigureForm} from a packet.
  
  @param packet
  @param elem
  @return The configuration form