def insert_new_categories(conn, category_type_id, group):
    if (is_conn(conn) and is_int(category_type_id)):
        if ('name' in group):
            category_name = group['name']
            add_category(conn, category_name, category_type_id)
            category = get_categories_by_category_type_id_and_name(conn, category_name, category_type_id)
            print('\nNew Category Inserted : ', category[0])
            category_id = category[0][0]
            return category_id
    else:
        raise AttributeError('Connection object or Category Type ID                 was not provided')
def insert_new_categories(conn, category_type_id, group):
    if (is_conn(conn) and is_int(category_type_id)):
        if ('name' in group):
            category_name = group['name']
            add_category(conn, category_name, category_type_id)
            category = get_categories_by_category_type_id_and_name(conn, category_name, category_type_id)
            print('\nNew Category Inserted : ', category[0])
            category_id = category[0][0]
            return category_id
    else:
        raise AttributeError('Connection object or Category Type ID                 was not provided')