def _estr_to_file(srcdir, eo, verbose=False):
  """Return a mapping from emoji string to filename, for emoji strings
  that we don't skip.  Verifies that we have group information for each
  file that we don't skip."""

  added = []
  skipped = []
  missing = []
  result = {}

  emoji_strings = eo.emoji_strings()
  for f in sorted(glob.glob(path.join(srcdir, 'emoji_u*.png'))):
    fname = path.basename(f)
    parts = fname[7:-4].split('_')
    # Omit emoji presentation variation selector, it should not be necessary.
    cps = [int(part, 16) for part in parts]
    if not _keep_sequence(cps):
      skipped.append(cps)
      continue
    estr = u''.join(unichr(cp) for cp in cps)
    if estr not in emoji_strings:
      missing.append(cps)
      continue
    result[estr] = f

  _add_flag_aliases(result, added, skipped, missing)

  if verbose:
    _report_info('added', added)
    _report_info('skipped', skipped)
    _report_info('missing', missing)
  assert not missing

  return result
dataset/ETHPy150Open googlei18n/nototools/nototools/generate_emoji_name_data.py/_estr_to_file/original