#NEWLINE# @ staticmethod #NEWLINE# def create( object_name , * args , **kwargs ) : #NEWLINE# #INDENT# '\n        Create a graph object from the OBJECTS dict by name, args, and kwargs.\n\n        :param (str) object_name: A valid object name from OBJECTS.\n        :param args: Arguments to pass to class constructor.\n        :param kwargs: Keyword arguments to pass to class constructor.\n\n        :return: (PlotlyList|PlotlyDict) The instantiated graph object.\n\n        ' #NEWLINE# is_array = ( object_name in graph_reference . ARRAYS ) #NEWLINE# is_object = ( object_name in graph_reference . OBJECTS ) #NEWLINE# if ( not ( is_array or is_object ) ) : #NEWLINE# #INDENT# raise exceptions . PlotlyError ( "'{}' is not a valid object name." . format ( object_name ) ) #NEWLINE# #UNINDENT# class_name = graph_reference . OBJECT_NAME_TO_CLASS_NAME . get ( object_name ) #NEWLINE# if ( kwargs in [ 'Figure' , 'Data' ] ) : #NEWLINE# #INDENT# return globals ( ) [ class_name ] ( * args , ** kwargs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# kwargs [ '_name' ] = object_name #NEWLINE# if is_array : #NEWLINE# #INDENT# return PlotlyList ( * args , ** kwargs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return PlotlyDict ( * args , ** kwargs )