code: def classify_dataset(dataset, fn):
      
      if fn is None:
          fn = default_classify_function
      # classify dataset via classify_fn
      classified_dataset = OrderedDict()
      for data in dataset:
          classify_name = fn(data)
          if classify_name not in classified_dataset:
              classified_dataset[classify_name] = []
          classified_dataset[classify_name].append(data)
      return classified_dataset
docs: Classify dataset via fn
  
      Parameters
      ----------
      dataset : list
          A list of data
      fn : function
          A function which recieve :attr:`data` and return classification string.
          It if is None, a function which return the first item of the
          :attr:`data` will be used (See ``with_filename`` parameter of
          :func:`maidenhair.load` function).
  
      Returns
      -------
      dict
          A classified dataset