original_docstring: Add default behaviour for datasets defining an attribute
          :attr:`data`, which in turn is a dataset. This happens often when
          stacking several datasets on top of each other.
  
          The default behaviour is to return ``self.data.labels``
          if possible, and otherwise revert to the original behaviour.
          
docstring: Add default behaviour for datasets defining an attribute
docstring_tokens: Add default behaviour for datasets defining an attribute
code: def labels(self):
          """Add default behaviour for datasets defining an attribute
          :attr:`data`, which in turn is a dataset. This happens often when
          stacking several datasets on top of each other.
  
          The default behaviour is to return ``self.data.labels``
          if possible, and otherwise revert to the original behaviour.
          """
          if hasattr(self, "data"):
              return self.data.labels
          elif hasattr(self, "_labels"):
              return self._labels
          else:
              return super().labels
code_tokens: def labels ( self ) : if hasattr ( self , "data" ) : return self . data . labels elif hasattr ( self , "_labels" ) : return self . _labels else : return super ( ) . labels
short_docstring: Add default behaviour for datasets defining an attribute
short_docstring_tokens: Add default behaviour for datasets defining an attribute
comment: """Add default behaviour for datasets defining an attribute
          :attr:`data`, which in turn is a dataset. This happens often when
          stacking several datasets on top of each other.
  
          The default behaviour is to return ``self.data.labels``
          if possible, and otherwise revert to the original behaviour.
          """