code: public static boolean isEventMetadataRequired(ObserverMethod<?> observer) {
          if (observer instanceof EventMetadataAwareObserverMethod) {
              EventMetadataAwareObserverMethod<?> eventMetadataAware = (EventMetadataAwareObserverMethod<?>) observer;
              return eventMetadataAware.isEventMetadataRequired();
          } else {
              return true;
          }
      }
docs: Determines whether the given observer method is either extension-provided or contains an injection point with {@link EventMetadata} type.