def METHOD_NAME(module_name, source_files):
  """Get source code root_dir from source_files in .podspecs Assume the
    root_dir is with the format:
    {module_name}/Sources or {module_name}/Source
    """
  MODULE_ROOT_PATCH = {
      'FirebaseFirestore': 'Firestore/Source',
      'FirebaseFirestoreSwift': 'Firestore/Swift/Source',
      'FirebaseCrashlytics': 'Crashlytics/Crashlytics',
      'FirebaseInAppMessagingSwift': 'FirebaseInAppMessaging/Swift/Source',
  }
  if module_name in MODULE_ROOT_PATCH:
    return MODULE_ROOT_PATCH[module_name]
  if source_files:
    for source_file in source_files:
      if f'{module_name}/Sources' in source_file:
        return f'{module_name}/Sources'
      if f'{module_name}/Source' in source_file:
        return f'{module_name}/Source'
  return ''