code: def append_variables(self, samples_like, sort_labels=True):
          samples, labels = as_samples(samples_like)
          num_samples = len(self)
          if samples.shape[0] == num_samples:
              pass
          elif samples.shape[0] == 1 and num_samples:
              samples = np.repeat(samples, num_samples, axis=0)
          else:
              msg = ("mismatched shape. The samples to append should either be "
                     "a single sample or should match the length of the sample "
                     "set. Empty sample sets cannot be appended to.")
              raise ValueError(msg)
          variables = self.variables
          if any(v in variables for v in labels):
              msg = "Appended samples cannot contain variables in sample set"
              raise ValueError(msg)
          new_variables = list(variables) + labels
          new_samples = np.hstack((self.record.sample, samples))
          return type(self).from_samples((new_samples, new_variables),
                                         self.vartype,
                                         info=copy.deepcopy(self.info),
                                         sort_labels=sort_labels,
                                         **self.data_vectors)