def insertmany_query(tablename, objects):
    """
    Function to process the query for insert many  process
    """
    if isinstance(tablename, str):
        pass
    else:
        raise ValueError('Table name argument must be a string')
    if isinstance(objects, list):
        pass
    else:
        raise ValueError(' objects argument must be list')
    if isinstance(objects[0], dict):
        pass
    else:
        raise ValueError('A value in objects argument must be a dictionary')
    """
    Sanity check of bulk insert
    """
    len_objects = []
    for val in map(len, objects):
        len_objects.append(val)
    if len(set(len_objects)) != 1:
        raise ValueError('Objects are off different length')
    columns = set(objects[0].keys())
    for val in objects:
        if columns != set(val.keys()):
            raise ValueError(
                'The number of columns that has to be updated must be same across all the objects'
                )
    val = objects[0]
    cols = ''
    for i in tuple(val.keys()):
        cols += str(i) + ','
    cols = '(' + cols[:len(cols) - 1] + ')'
    placeholders = ''
    for i in tuple(val.keys()):
        placeholders += ':' + str(i) + ','
    placeholders = '(' + placeholders[:len(placeholders) - 1] + ')'
    query = 'INSERT INTO ' + tablename + ' ' + cols + ' values ' + placeholders
    return query
