original_docstring: 
          Helper function to expand data into the Wikibase API structure.
  
          :param data: Data to normalize
          :type data: list or dict
  
          :return: The dict with normalized data
          
docstring: Helper function to expand data into the Wikibase API structure.
docstring_tokens: Helper function to expand data into the Wikibase API structure .
code: def normalizeData(cls, data) -> dict:
          """
          Helper function to expand data into the Wikibase API structure.
  
          :param data: Data to normalize
          :type data: list or dict
  
          :return: The dict with normalized data
          """
          norm_data = {}
          if isinstance(data, dict):
              for key, obj in data.items():
                  key = cls.getdbName(key)
                  json = cls._extract_json(obj)
                  if isinstance(json, str):
                      json = {'site': key, 'title': json}
                  elif key != json['site']:
                      raise ValueError(
                          "Key '{}' doesn't match the site of the value: '{}'"
                          .format(key, json['site']))
                  norm_data[key] = json
          else:
              for obj in data:
                  json = cls._extract_json(obj)
                  if not isinstance(json, dict):
                      raise ValueError(
                          "Couldn't determine the site and title of the value: "
                          '{!r}'.format(json))
                  db_name = json['site']
                  norm_data[db_name] = json
          return norm_data
code_tokens: def normalizeData ( cls , data ) -> dict : norm_data = { } if isinstance ( data , dict ) : for key , obj in data . items ( ) : key = cls . getdbName ( key ) json = cls . _extract_json ( obj ) if isinstance ( json , str ) : json = { 'site' : key , 'title' : json } elif key != json [ 'site' ] : raise ValueError ( "Key '{}' doesn't match the site of the value: '{}'" . format ( key , json [ 'site' ] ) ) norm_data [ key ] = json else : for obj in data : json = cls . _extract_json ( obj ) if not isinstance ( json , dict ) : raise ValueError ( "Couldn't determine the site and title of the value: " '{!r}' . format ( json ) ) db_name = json [ 'site' ] norm_data [ db_name ] = json return norm_data
short_docstring: Helper function to expand data into the Wikibase API structure.
short_docstring_tokens: Helper function to expand data into the Wikibase API structure .
comment: """
          Helper function to expand data into the Wikibase API structure.
  
          :param data: Data to normalize
          :type data: list or dict
  
          :return: The dict with normalized data
          """