docs: def convert_v1_to_v2(
          dict  # type: Dict[str, Any]
      ):
      # type: (...) -> Dict[str, Any]
      """
      Convert v1 schema dict to v2 schema dict.
      :param dict: v1 schema dict
      :return: v2 schema dict
      """
      version = dict['version']
      if version != 1:
          raise ValueError('Version {} not 1'.format(version))
  
      clk_config = dict['clkConfig']
      k = clk_config['k']
      clk_hash = clk_config['hash']
  
      def convert_feature(f):
          if 'ignored' in f:
              return f
  
          hashing = f['hashing']
          weight = hashing.get('weight', 1.0)
  
          if weight == 0:
              return {
                  'identifier': f['identifier'],
                  'ignored': True
              }
  
          x = deepcopy(f)
          hashing = x['hashing']
          if 'weight' in hashing:
              del hashing['weight']
  
          hashing['k'] = int(round(weight * k))
          hashing['hash'] = clk_hash
          return x
  
      result = {
          'version': 2,
          'clkConfig': {
              'l': clk_config['l'],
              'xor_folds': clk_config.get('xor_folds', 0),
              'kdf': clk_config['kdf']
          },
          'features': list(map(convert_feature, dict['features']))
      }
      return result