<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def persist_upstream_diagram(self, filepath):
 """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 """

        assert isinstance(filepath, str),\
            'Step {} error, filepath must be str. Got {} instead'.format(self.name, type(filepath))
        persist_as_png(self.upstream_structure, filepath)