parameters: (database, new_section)
return_statement: return database
docstring: Adds a new section to the database
docstring_summary: Adds a new section to the database
docstring_tokens: Adds a new section to the database
function: def add_section(database, new_section):
      """Adds a new section to the database"""
      for old_section in database["sections"]:
  
          # Verify whether the sections match
          equal = True
          for attribute in new_section.keys():
              if attribute != "results":
                  if attribute not in old_section or new_section[attribute] != old_section[attribute]:
                      equal = False
                      break
  
          # They match: append the new section's results to the corresponding entry in the database and return
          if equal:
              old_section["results"] = combine_results(old_section["results"], new_section["results"])
              return database
  
      # No match found: append the whole new section to the database
      database["sections"].append(new_section)
      return database
function_tokens: def add_section ( database , new_section ) : for old_section in database [ "sections" ] : # Verify whether the sections match equal = True for attribute in new_section . keys ( ) : if attribute != "results" : if attribute not in old_section or new_section [ attribute ] != old_section [ attribute ] : equal = False break # They match: append the new section's results to the corresponding entry in the database and return if equal : old_section [ "results" ] = combine_results ( old_section [ "results" ] , new_section [ "results" ] ) return database # No match found: append the whole new section to the database database [ "sections" ] . append ( new_section ) return database