code: def set_flow(self, flow):
          
          if not hasattr(self, "_flow"):
              self._flow = flow
          else:
              if self._flow != flow:
                  raise ValueError("self._flow != flow")
docs: Set the flow associated to this :class:`Work`.