def get_attributes_dicts(object_name, parent_object_names=()):
 object_dict = OBJECTS[object_name]
 additional_attributes = object_dict['additional_attributes']
 attribute_paths = list(object_dict['attribute_paths'])
 if (FRAME_NAME in parent_object_names):
  len_parent_object_names = len(parent_object_names)
  index = parent_object_names.index(FRAME_NAME)
  if (len_parent_object_names == (index + 1)):
   if (object_name in ('data', 'layout')):
    parent_object_names = ['figure', object_name]
  elif (len_parent_object_names > (index + 1)):
   if (parent_object_names[(index + 1)] in ('data', 'layout')):
    parent_object_names = (['figure'] + list(parent_object_names)[(index + 1):])
 for parent_object_name in reversed(parent_object_names):
  if (parent_object_name in ARRAYS):
   continue
  parent_object_dict = OBJECTS[parent_object_name]
  parent_attribute_paths = parent_object_dict['attribute_paths']
  for path in list(attribute_paths):
   if (not _is_valid_sub_path(path, parent_attribute_paths)):
    attribute_paths.remove(path)
 attributes_dicts = {path: utils.get_by_path(GRAPH_REFERENCE, path) for path in attribute_paths}
 attributes_dicts['additional_attributes'] = additional_attributes
 return attributes_dicts

def get_attributes_dicts ( object_name , parent_object_names = ( ) ) : object_dict = OBJECTS [ object_name ] additional_attributes = object_dict [ 'additional_attributes' ] attribute_paths = list ( object_dict [ 'attribute_paths' ] ) if ( FRAME_NAME in parent_object_names ) : len_parent_object_names = len ( parent_object_names ) index = parent_object_names . index ( FRAME_NAME ) if ( len_parent_object_names == ( index + 1 ) ) : if ( object_name in ( 'data' , 'layout' ) ) : parent_object_names = [ 'figure' , object_name ] elif ( len_parent_object_names > ( index + 1 ) ) : if ( parent_object_names [ ( index + 1 ) ] in ( 'data' , 'layout' ) ) : parent_object_names = ( [ 'figure' ] + list ( parent_object_names ) [ ( index + 1 ) : ] ) for parent_object_name in reversed ( parent_object_names ) : if ( parent_object_name in ARRAYS ) : continue parent_object_dict = OBJECTS [ parent_object_name ] parent_attribute_paths = parent_object_dict [ 'attribute_paths' ] for path in list ( attribute_paths ) : if ( not _is_valid_sub_path ( path , parent_attribute_paths ) ) : attribute_paths . remove ( path ) attributes_dicts = { path : utils . get_by_path ( GRAPH_REFERENCE , path ) for path in attribute_paths } attributes_dicts [ 'additional_attributes' ] = additional_attributes return attributes_dicts
returns *all* attribute information given the context of parents .