code: def get_labels(self, depth=None):
          
          if not isinstance(self.ref_cell, Cell):
              return []
          if self.rotation is not None:
              ct = numpy.cos(self.rotation * numpy.pi / 180.0)
              st = numpy.sin(self.rotation * numpy.pi / 180.0)
              st = numpy.array([-st, st])
          if self.magnification is not None:
              mag = numpy.array([self.magnification, self.magnification])
          if self.origin is not None:
              orgn = numpy.array(self.origin)
          if self.x_reflection:
              xrefl = numpy.array([1, -1], dtype='int')
          cell_labels = self.ref_cell.get_labels(depth=depth)
          labels = []
          for ii in range(self.columns):
              for jj in range(self.rows):
                  spc = numpy.array([self.spacing[0] * ii, self.spacing[1] * jj])
                  for clbl in cell_labels:
                      lbl = libCopy.deepcopy(clbl)
                      if self.magnification:
                          lbl.position = lbl.position * mag + spc
                      else:
                          lbl.position = lbl.position + spc
                      if self.x_reflection:
                          lbl.position = lbl.position * xrefl
                      if self.rotation is not None:
                          lbl.position = lbl.position * ct + lbl.position[::-1] * st
                      if self.origin is not None:
                          lbl.position = lbl.position + orgn
                      labels.append(lbl)
          return labels
docs: Returns a list of labels created by this reference.
  
          Parameters
          ----------
          depth : integer or ``None``
              If not ``None``, defines from how many reference levels to
              retrieve labels from.
  
          Returns
          -------
          out : list of ``Label``
              List containing the labels in this cell and its references.