code: def cast(self, dtype):
          
          for child in self._children.values():
              child.cast(dtype)
          for _, param in self.params.items():
              param.cast(dtype)
docs: Cast this Block to use another data type.
  
          Parameters
          ----------
          dtype : str or numpy.dtype
              The new data type.