def _batch_feat_dicts(frames, keys, feat_dict_name):
    """Internal function to batch feature dictionaries.

    Parameters
    ----------
    frames : list[Frame]
        List of frames
    keys : list[str]
        Feature keys. Can be '__ALL__', meaning batching all features.
    feat_dict_name : str
        Name of the feature dictionary for reporting errors.

    Returns
    -------
    dict[str, Tensor]
        New feature dict.
    """
    if len(frames) == 0:
        return {}
    schemas = [frame.schemes for frame in frames]
    # sanity checks
    if is_all(keys):
        utils.check_all_same_schema(schemas, feat_dict_name)
        keys = schemas[0].keys()
    else:
        utils.check_all_same_schema_for_keys(schemas, keys, feat_dict_name)
    # concat features
    ret_feat = {k: F.cat([fd[k] for fd in frames], 0) for k in keys}
    return ret_feat
Internal function to batch feature dictionaries.

    Parameters
    ----------
    frames : list[Frame]
        List of frames
    keys : list[str]
        Feature keys. Can be '__ALL__', meaning batching all features.
    feat_dict_name : str
        Name of the feature dictionary for reporting errors.

    Returns
    -------
    dict[str, Tensor]
        New feature dict.
    
python/dgl/batch.py