code: def _any(x, axis, keepdims):
      if axis is None and not keepdims:
          return torch.any(x)
  
      if isinstance(axis, int):
          return torch.any(x, axis, keepdim=keepdims)
  
      # reduce over multiple dims.
      x_flattened, reduced_dim = _flatten_reduced_dim(x, axis)
      if keepdims:
          shape = tuple(
              1 if i in reduced_dim else x.shape[i]
              for i in range(x.dim())
          )
          return torch.any(x_flattened, -1).view(shape)
      return torch.any(x_flattened, -1)
  
imports: import numbers
  import typing
  import torch
  import funsor.ops
label_desc: Use image node_id 3 for calling a global function with example usage: _any(x, axis, keepdims) and returns: torch, torch, torch, torch