import copy


def get_db_api_get_items_by_ids(*items):
    """Generate db_api.get_items_by_ids mock function."""

    def db_api_get_items_by_ids(context, item_ids):
        return [copy.deepcopy(item)
                for item in items
                if (item['id'] in item_ids)]
    return db_api_get_items_by_ids