def cpu_cached_feature(
    fallback_features: Union[Feature, Dict[FeatureKey, Feature]],
    max_cache_size_in_bytes: int,
    policy: Optional[str] = None,
    pin_memory: bool = False,
) -> Union[CPUCachedFeature, Dict[FeatureKey, CPUCachedFeature]]:
    r"""CPU cached feature wrapping a fallback feature.

    Parameters
    ----------
    fallback_features : Union[Feature, Dict[FeatureKey, Feature]]
        The fallback feature(s).
    max_cache_size_in_bytes : int
        The capacity of the cache in bytes. The size should be a few factors
        larger than the size of each read request. Otherwise, the caching policy
        will hang due to all cache entries being read and/or write locked,
        resulting in a deadlock.
    policy : str, optional
        The cache eviction policy algorithm name. The available policies are
        ["s3-fifo", "sieve", "lru", "clock"]. Default is "sieve".
    pin_memory : bool, optional
        Whether the cache storage should be allocated on system pinned memory.
        Default is False.
    Returns
    -------
    Union[CPUCachedFeature, Dict[FeatureKey, CPUCachedFeature]]
        New feature(s) wrapped with CPUCachedFeature.
    """
    return wrap_with_cached_feature(
        CPUCachedFeature,
        fallback_features,
        max_cache_size_in_bytes,
        policy=policy,
        pin_memory=pin_memory,
    )
CPU cached feature wrapping a fallback feature.

    Parameters
    ----------
    fallback_features : Union[Feature, Dict[FeatureKey, Feature]]
        The fallback feature(s).
    max_cache_size_in_bytes : int
        The capacity of the cache in bytes. The size should be a few factors
        larger than the size of each read request. Otherwise, the caching policy
        will hang due to all cache entries being read and/or write locked,
        resulting in a deadlock.
    policy : str, optional
        The cache eviction policy algorithm name. The available policies are
        ["s3-fifo", "sieve", "lru", "clock"]. Default is "sieve".
    pin_memory : bool, optional
        Whether the cache storage should be allocated on system pinned memory.
        Default is False.
    Returns
    -------
    Union[CPUCachedFeature, Dict[FeatureKey, CPUCachedFeature]]
        New feature(s) wrapped with CPUCachedFeature.
    
python/dgl/graphbolt/impl/cpu_cached_feature.py