import re


def GetResourceIdsInPragmaWarnings(input):
  """Returns sorted set of resource ids that are inside unknown pragma warnings
     for the given input.
  """
  used_resources = set()
  unknown_pragma_warning_pattern = re.compile(
      'whitelisted_resource_(?P<resource_id>[0-9]+)')
  for ln in input:
    match = unknown_pragma_warning_pattern.search(ln)
    if match:
      resource_id = int(match.group('resource_id'))
      used_resources.add(resource_id)
  return sorted(used_resources)