docstr: ivy.Array instance method variant of ivy.trim_zeros.
  
  This method simply wraps the function, and so the docstring for
  ivy.trim_zeros also applies to this method with minimal changes.
  
  Parameters
  ----------
  self : 1-D array
      Input array.
  trim : str, optional
      A string with 'f' representing trim from front and 'b' to trim from
      back. Default is 'fb', trim zeros from both front and back of the
      array.
  
  Returns
  -------
      1-D array
      The result of trimming the input. The input data type is preserved.
  
  Examples
  --------
  >>> a = ivy.array([0, 0, 0, 0, 8, 3, 0, 0, 7, 1, 0])
  >>> ivy.trim_zeros(a)
  array([8, 3, 0, 0, 7, 1])
  
  >>> ivy.trim_zeros(a, 'b')
  array([0, 0, 0, 0, 8, 3, 0, 0, 7, 1])
  
  >>> ivy.trim_zeros([0, 8, 3, 0, 0])
  [8, 3]
code: def trim_zeros(
      self: ivy.Array,
      /,
      *,
      trim: Optional[str] = "fb",
  ) -> ivy.Array:
      """ivy.Array instance method variant of ivy.trim_zeros.
  
      This method simply wraps the function, and so the docstring for
      ivy.trim_zeros also applies to this method with minimal changes.
  
      Parameters
      ----------
      self : 1-D array
          Input array.
      trim : str, optional
          A string with 'f' representing trim from front and 'b' to trim from
          back. Default is 'fb', trim zeros from both front and back of the
          array.
  
      Returns
      -------
          1-D array
          The result of trimming the input. The input data type is preserved.
  
      Examples
      --------
      >>> a = ivy.array([0, 0, 0, 0, 8, 3, 0, 0, 7, 1, 0])
      >>> ivy.trim_zeros(a)
      array([8, 3, 0, 0, 7, 1])
  
      >>> ivy.trim_zeros(a, 'b')
      array([0, 0, 0, 0, 8, 3, 0, 0, 7, 1])
  
      >>> ivy.trim_zeros([0, 8, 3, 0, 0])
      [8, 3]
      """
      return ivy.trim_zeros(self, trim=trim)
  
imports: import abc
  from typing import Optional, Union, Sequence, Tuple, List, Iterable, Callable, Literal, Any
  from numbers import Number
  import ivy
  from ivy import handle_view
label_desc: Use image node_id 27 for calling the _ArrayWithManipulationExperimental obj's underlying member method code with example usage: obj.trim_zeros() and returns: ivy