code: def set_parent(self, new_samp):
          
          self.sample = new_samp
          if new_samp:
              if not isinstance(new_samp, Sample):
                  raise Exception
          self.propagate_data()
          return new_samp
docs: Set self.sample as either an empty string, or with a new Sample.