original_docstring:  Collect available PACKAGECONFIG flags and all affected pkgs 
docstring: Collect available PACKAGECONFIG flags and all affected pkgs
docstring_tokens: Collect available PACKAGECONFIG flags and all affected pkgs
code: def collect_flags(pkg_dict):
      ''' Collect available PACKAGECONFIG flags and all affected pkgs '''
      # flag_dict = {'flag': ['pkg1', 'pkg2',...]}
      flag_dict = {}
      for pkgname, flaglist in pkg_dict.items():
          for flag in flaglist:
              if flag in flag_dict:
                  flag_dict[flag].append(pkgname)
              else:
                  flag_dict[flag] = [pkgname]
  
      return flag_dict
code_tokens: def collect_flags ( pkg_dict ) : flag_dict = { } for pkgname , flaglist in pkg_dict . items ( ) : for flag in flaglist : if flag in flag_dict : flag_dict [ flag ] . append ( pkgname ) else : flag_dict [ flag ] = [ pkgname ] return flag_dict
short_docstring: Collect available PACKAGECONFIG flags and all affected pkgs
short_docstring_tokens: Collect available PACKAGECONFIG flags and all affected pkgs
comment: ''' Collect available PACKAGECONFIG flags and all affected pkgs '''$SEP$# flag_dict = {'flag': ['pkg1', 'pkg2',...]}