def _SectionDictFromConfigList(boto_config_list):
  """Converts the input config list to a dict that is easy to write to a file.

  This is used to reset the boto config contents for a test instead of
  preserving the existing values.

  Args:
    boto_config_list: list of tuples of:
        (boto config section to set, boto config name to set, value to set)
        If value to set is None, no entry is created.

  Returns:
    Dictionary of {section: {keys: values}} for writing to the file.
  """
  sections = {}
  for config_entry in boto_config_list:
    section, key, value = (config_entry[0], config_entry[1], config_entry[2])
    if sections not in section:
      sections[section] = {}
    if value is not None:
      sections[section][key] = value

  return sections
dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/tests/util.py/_SectionDictFromConfigList/swapped operands of `not in`