docs: def create_chunked_list(in_dir, size, out_dir, out_name):
      """Create a division of the input files in chunks.
  
      The result is stored to a JSON file.
      """
      create_dirs(out_dir)
  
      in_files = get_files(in_dir)
      chunks = chunk(in_files, size)
  
      division = {}
  
      for i, files in enumerate(chunks):
          division[i] = [os.path.basename(f) for f in files]
  
      out_file = os.path.join(out_dir, out_name)
      with codecs.open(out_file, 'wb', encoding='utf-8') as f:
          json.dump(division, f, indent=4)