docs: def serialise(self, obj):
          """
          Take an object from the project or the runner and serialise it into a
          dictionary.
  
          Parameters
          ----------
          obj : object
              An object to serialise.
  
          Returns
          -------
          object
              A serialised version of the input object.
          """
  
          if isinstance(obj, (list, VariableCollection, StepCollection)):
              return [self.serialise(element) for element in obj]
          elif isinstance(obj, dict):
              return {k: self.serialise(v) for k, v in obj.items()}
          elif isinstance(obj, str):
              return obj
          elif isinstance(obj, (Event, Task, Variable, Step)):
              return self.serialise(obj._asdict())
          elif obj is None:
              return None
          else:
              raise TypeError(type(obj))