def function_beginning(graphparser):
    """ Writes the very beginning of the create function, i.e. prototype and vxCreateGraph"""

    num_input_imgs = len(graphparser.image_nodes.input_nodes_indexed_names)
    num_output_imgs = len(graphparser.image_nodes.output_nodes_indexed_names)

    parsed_string = """\
/* Quick hack to avoid graph_manager dependency while avoiding hacking up the graph_parser too much internally */
#define graphmanager_get_context(graph_manager) context

bool
%s_create(vx_context context, vx_graph graph_skeleton, vx_image input_images[%s], vx_image output_images[%s], void *userdata)
{
""" % (graphparser.graphname, num_input_imgs, num_output_imgs)
    return parsed_string