docs: def get_sub_extractors_by_property(extractor, property_name, return_property_list=False):
      '''Divides Recording or Sorting Extractor based on the property_name (e.g. group)
  
      Parameters
      ----------
      extractor: RecordingExtractor or SortingExtractor
          The extractor to be subdivided in subextractors
      property_name: str
          The property used to subdivide the extractor
      return_property_list: bool
          If True the property list is returned
  
      Returns
      -------
      List of subextractors
  
      '''
      if isinstance(extractor, RecordingExtractor):
          if property_name not in extractor.get_channel_property_names():
              raise ValueError("'property_name' must be must be a property of the recording channels")
          else:
              sub_list = []
              recording = extractor
              properties = np.array([recording.get_channel_property(chan, property_name)
                                     for chan in recording.get_channel_ids()])
              prop_list = np.unique(properties)
              for prop in prop_list:
                  prop_idx = np.where(prop == properties)
                  chan_idx = list(np.array(recording.get_channel_ids())[prop_idx])
                  sub_list.append(SubRecordingExtractor(recording, channel_ids=chan_idx))
              if return_property_list:
                  return sub_list, prop_list
              else:
                  return sub_list
      elif isinstance(extractor, SortingExtractor):
          if property_name not in extractor.get_unit_property_names():
              raise ValueError("'property_name' must be must be a property of the units")
          else:
              sub_list = []
              sorting = extractor
              properties = np.array([sorting.get_unit_property(unit, property_name)
                                     for unit in sorting.get_unit_ids()])
              prop_list = np.unique(properties)
              for prop in prop_list:
                  prop_idx = np.where(prop == properties)
                  unit_idx = list(np.array(sorting.get_unit_ids())[prop_idx])
                  sub_list.append(SubSortingExtractor(sorting, unit_ids=unit_idx))
              if return_property_list:
                  return sub_list, prop_list
              else:
                  return sub_list
      else:
          raise ValueError("'extractor' must be a RecordingExtractor or a SortingExtractor")