function parseEventHintOrCaptureContext(
  hint,
) {
  if (!hint) {
    return undefined;
  }

  // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext
  if (hintIsScopeOrFunction(hint)) {
    return { captureContext: hint };
  }

  if (hintIsScopeContext(hint)) {
    return {
      captureContext: hint,
    };
  }

  return hint;
}
Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.
This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.