def filter_by_tag(self, tags):

        if isinstance(tags, string_types):
            message = "tags should be a list or None, got tags={}".format(tags)
            raise TypeError(message)

        data_collection = DataCollection()
        for item in self.iteritems():
            if tags == [] or tags == None or all([tag in item.tags for tag in tags]):
                data_collection.add_data(item)
        return data_collection
Returns any data containers matching the filter criteria.
dataset/ETHPy150Open impactlab/eemeter/eemeter/meter/base.py/DataCollection.filter_by_tag