class_docstr: Safely project a vector onto the sphere wrt the ``p`` norm. This avoids
  the singularity at zero by mapping to the vector ``[1, 0, 0, ..., 0]``.
class_docstr_tok: ["Safely","project","a","vector","onto","the","sphere","wrt","the","``","p","``","norm",".","This","avoids","the","singularity","at","zero","by","mapping","to","the","vector","``","[","1",",","0",",","0",",","...",",","0","]","``","."]
code: def with_cache(self, cache_size=1):
      if self._cache_size == cache_size:
          return self
      return Normalize(self.p, cache_size=cache_size)
  
file_path: pyro/pyro/distributions/transforms/normalize.py
imports: import numbers
  from torch.distributions.transforms import Transform
  from pyro.ops.tensor_utils import safe_normalize
  from ..None import constraints
label_desc: Use image node_id 5 for calling the Normalize obj's underlying member method code with example usage: obj.with_cache(cache_size) and returns: Normalize, self