code: def persist_upstream_diagram(self, filepath):
          
          assert isinstance(filepath, str),\
              'Step {} error, filepath must be str. Got {} instead'.format(self.name, type(filepath))
          persist_as_png(self.upstream_structure, filepath)
docs: Creates upstream steps diagram and persists it to disk as png file.
  
          Pydot graph is created and persisted to disk as png file under the filepath directory.
  
          Args:
              filepath (str): filepath to which the png with steps visualization should
                  be persisted