def __init__(self, **options):
    defaults = {'graph_name': 'Image Graph', 'node_names': ['Image', 'Png'], 'node_descriptions': ['PIL Image', 'Png'], 'current_node': 'Image', 'state': [1, 0], 'data': PIL.Image.open(os.path.join(TESTS_DIRECTORY, 'test.png')), 'edge_2_to_1': File_to_Image, 'edge_1_to_2': (lambda x: Image_to_FileType(x, file_path='test', extension='png'))}
    self.options = {}
    for (key, value) in defaults.items():
        self.options[key] = value
    for (key, value) in options.items():
        self.options[key] = value
    Graph.__init__(self, **self.options)
    self.add_node('Jpg', 'Image', (lambda x: Image_to_FileType(x, file_path='test', extension='jpg')), 'Image', File_to_Image, node_description='Jpg File')
    self.add_node('Tiff', 'Image', (lambda x: Image_to_FileType(x, file_path='test', extension='tiff')), 'Image', File_to_Image, node_description='Tif File')
    self.add_node('Gif', 'Image', (lambda x: Image_to_FileType(x, file_path='test', extension='gif')), 'Image', File_to_Image, node_description='Gif File')
    self.add_node('Bmp', 'Image', (lambda x: Image_to_FileType(x, file_path='test', extension='bmp')), 'Image', File_to_Image, node_description='BMP File')
    self.add_node('Base64', 'Png', PngFile_to_Base64, 'Png', Base64_to_PngFile, node_description='Base 64 PNG')
    self.add_node('EmbeddedHtml', 'Base64', Base64Png_to_EmbeddedHtmlString, 'Base64', EmbeddedHtmlString_to_Base64Png, node_description='Embedded HTML of PNG')
    self.add_node('Ndarray', 'Png', PngFile_to_Ndarray, 'Png', Ndarray_to_PngFile, node_description='Numpy Array')
    self.add_node('MatplotlibFigure', 'Ndarray', Ndarray_to_MatplotlibFigure, 'Png', MatplotlibFigure_to_PngFile, node_description='MatplotlibFigure')
    self.add_external_node('Thumbnail', 'Image', Image_to_ThumbnailFile, external_node_description='JPEG Thumbnail')
    self.add_external_node('Matplotlib', 'Ndarray', Ndarray_to_Matplotlib, external_node_description='Matplotlib Plot')
def __init__(self, **options):
    defaults = {'graph_name': 'Image Graph', 'node_names': ['Image', 'Png'], 'node_descriptions': ['PIL Image', 'Png'], 'current_node': 'Image', 'state': [1, 0], 'data': PIL.Image.open(os.path.join(TESTS_DIRECTORY, 'test.png')), 'edge_2_to_1': File_to_Image, 'edge_1_to_2': (lambda x: Image_to_FileType(x, file_path='test', extension='png'))}
    self.options = {}
    for (key, value) in defaults.items():
        self.options[key] = value
    for (key, value) in options.items():
        self.options[key] = value
    Graph.__init__(self, **self.options)
    self.add_node('Jpg', 'Image', (lambda x: Image_to_FileType(x, file_path='test', extension='jpg')), 'Image', File_to_Image, node_description='Jpg File')
    self.add_node('Tiff', 'Image', (lambda x: Image_to_FileType(x, file_path='test', extension='tiff')), 'Image', File_to_Image, node_description='Tif File')
    self.add_node('Gif', 'Image', (lambda x: Image_to_FileType(x, file_path='test', extension='gif')), 'Image', File_to_Image, node_description='Gif File')
    self.add_node('Bmp', 'Image', (lambda x: Image_to_FileType(x, file_path='test', extension='bmp')), 'Image', File_to_Image, node_description='BMP File')
    self.add_node('Base64', 'Png', PngFile_to_Base64, 'Png', Base64_to_PngFile, node_description='Base 64 PNG')
    self.add_node('EmbeddedHtml', 'Base64', Base64Png_to_EmbeddedHtmlString, 'Base64', EmbeddedHtmlString_to_Base64Png, node_description='Embedded HTML of PNG')
    self.add_node('Ndarray', 'Png', PngFile_to_Ndarray, 'Png', Ndarray_to_PngFile, node_description='Numpy Array')
    self.add_node('MatplotlibFigure', 'Ndarray', Ndarray_to_MatplotlibFigure, 'Png', MatplotlibFigure_to_PngFile, node_description='MatplotlibFigure')
    self.add_external_node('Thumbnail', 'Image', Image_to_ThumbnailFile, external_node_description='JPEG Thumbnail')
    self.add_external_node('Matplotlib', 'Ndarray', Ndarray_to_Matplotlib, external_node_description='Matplotlib Plot')