def import_json(cls, filename):
        """
        Import graph from the given file.  The file is expected
        to contain UTF-8 encoded JSON data.

        """
        with open(filename, 'rb') as f:
            json_graph = f.read().decode('utf-8')
        return cls.from_json(json_graph)
def import_json ( cls , filename ) : with open ( filename , 'rb' ) as f : json_graph = f . read ( ) . decode ( 'utf-8' ) return cls . from_json ( json_graph )
Import graph from the given file.  The file is expected
        to contain UTF-8 encoded JSON data.