def merge_by_key(mapping, bind, value, args={}):
    """
    Merges list of objects by provided key (default is `id`).
    """
    if not isinstance(value, list):
        return value
    key = args.get('key', 'id')
    result = {}
    for obj in value:
        result.setdefault(key, {}).update(obj)
    return list(result.values())