docstr: Perform einops reduce operation on each sub array in the container.
  
  Parameters
  ----------
  x
      input container.
  pattern
      Reduction pattern.
  reduction
      One of available reductions ('min', 'max', 'sum', 'mean', 'prod'), or
      callable.
  key_chains
      The key-chains to apply or not apply the method to. Default is ``None``.
  to_apply
      If True, the method will be applied to key_chains, otherwise key_chains will
      be skipped. Default is ``True``.
  prune_unapplied
      Whether to prune key_chains for which the function was not applied. Default
      is False.
  map_sequences
      Whether to also map method to sequences (lists, tuples).
      Default is ``False``.
  axes_lengths
      Any additional specifications for dimensions.
  out
      optional array, for writing the result to. It must have a shape
      that the inputs broadcast to.
  
  Returns
  -------
      ivy.Container with each array having einops.reduce applied.
  
  Examples
  --------
  >>> x = ivy.Container(a=ivy.array([[-4.47, 0.93, -3.34],
  ...                                [3.66, 24.29, 3.64]]),
  ...                   b=ivy.array([[4.96, 1.52, -10.67],
  ...                                [4.36, 13.96, 0.3]]))
  >>> reduced = ivy.Container.static_einops_reduce(x, 'a b -> a', 'mean')
  >>> print(reduced)
  {
      a: ivy.array([-2.29333329, 10.53000069]),
      b: ivy.array([-1.39666676, 6.20666695])
  }
docstr_tok: ["Perform","einops","reduce","operation","on","each","sub","array","in","the","container",".","Parameters","--","--","--","--","--","x","input","container",".","pattern","Reduction","pattern",".","reduction","One","of","available","reductions","(","'min","'",",","'max","'",",","'sum","'",",","'mean","'",",","'prod","'",")",",","or","callable",".","key_chains","The","key-chains","to","apply","or","not","apply","the","method","to",".","Default","is","``","None","``",".","to_apply","If","True",",","the","method","will","be","applied","to","key_chains",",","otherwise","key_chains","will","be","skipped",".","Default","is","``","True","``",".","prune_unapplied","Whether","to","prune","key_chains","for","which","the","function","was","not","applied",".","Default","is","False",".","map_sequences","Whether","to","also","map","method","to","sequences","(","lists",",","tuples",")",".","Default","is","``","False","``",".","axes_lengths","Any","additional","specifications","for","dimensions",".","out","optional","array",",","for","writing","the","result","to",".","It","must","have","a","shape","that","the","inputs","broadcast","to",".","Returns","--","--","--","-","ivy.Container","with","each","array","having","einops.reduce","applied",".","Examples","--","--","--","--",">",">",">","x","=","ivy.Container","(","a=ivy.array","(","[","[","-4.47",",","0.93",",","-3.34","]",",","...","[","3.66",",","24.29",",","3.64","]","]",")",",","...","b=ivy.array","(","[","[","4.96",",","1.52",",","-10.67","]",",","...","[","4.36",",","13.96",",","0.3","]","]",")",")",">",">",">","reduced","=","ivy.Container.static_einops_reduce","(","x",",","'","a","b","-",">","a","'",",","'mean","'",")",">",">",">","print","(","reduced",")","{","a",":","ivy.array","(","[","-2.29333329",",","10.53000069","]",")",",","b",":","ivy.array","(","[","-1.39666676",",","6.20666695","]",")","}"]
code: def _static_einops_reduce(
      x: ivy.Container,
      pattern: Union[str, ivy.Container],
      reduction: Union[str, ivy.Container],
      /,
      *,
      key_chains: Optional[
          Union[List[str], Dict[str, str], ivy.Container]
      ] = None,
      to_apply: Union[bool, ivy.Container] = True,
      prune_unapplied: Union[bool, ivy.Container] = False,
      map_sequences: Union[bool, ivy.Container] = False,
      out: Optional[ivy.Container] = None,
      **axes_lengths: Union[Dict[str, int], ivy.Container],
  ) -> ivy.Container:
      """Perform einops reduce operation on each sub array in the container.
  
      Parameters
      ----------
      x
          input container.
      pattern
          Reduction pattern.
      reduction
          One of available reductions ('min', 'max', 'sum', 'mean', 'prod'), or
          callable.
      key_chains
          The key-chains to apply or not apply the method to. Default is ``None``.
      to_apply
          If True, the method will be applied to key_chains, otherwise key_chains will
          be skipped. Default is ``True``.
      prune_unapplied
          Whether to prune key_chains for which the function was not applied. Default
          is False.
      map_sequences
          Whether to also map method to sequences (lists, tuples).
          Default is ``False``.
      axes_lengths
          Any additional specifications for dimensions.
      out
          optional array, for writing the result to. It must have a shape
          that the inputs broadcast to.
  
      Returns
      -------
          ivy.Container with each array having einops.reduce applied.
  
      Examples
      --------
      >>> x = ivy.Container(a=ivy.array([[-4.47, 0.93, -3.34],
      ...                                [3.66, 24.29, 3.64]]),
      ...                   b=ivy.array([[4.96, 1.52, -10.67],
      ...                                [4.36, 13.96, 0.3]]))
      >>> reduced = ivy.Container.static_einops_reduce(x, 'a b -> a', 'mean')
      >>> print(reduced)
      {
          a: ivy.array([-2.29333329, 10.53000069]),
          b: ivy.array([-1.39666676, 6.20666695])
      }
      """
      return ContainerBase.cont_multi_map_in_function(
          "einops_reduce",
          x,
          pattern,
          reduction,
          key_chains=key_chains,
          to_apply=to_apply,
          prune_unapplied=prune_unapplied,
          map_sequences=map_sequences,
          out=out,
          **axes_lengths,
      )
  
imports: from numbers import Number
  from typing import Any, Union, List, Dict, Iterable, Optional, Callable
  from ivy.data_classes.container.base import ContainerBase
  import ivy
label_desc: Use image node_id 31 for calling the _ContainerWithGeneral obj's underlying member method code with example usage: obj._static_einops_reduce() and returns: ContainerBase