def take_spiketrains_by_unit(self, unit_list=None):
        if unit_list is None:
            return []
        spiketrain_list = []
        for spiketrain in self.spiketrains:
            if spiketrain.unit in unit_list:
                spiketrain_list.append(spiketrain)
        return spiketrain_list
Return :class:`SpikeTrains` in the :class:`Segment` that are also in a
dataset/ETHPy150Open NeuralEnsemble/python-neo/neo/core/segment.py/Segment.take_spiketrains_by_unit