code: def max_unpool1d(
      input: torch.Tensor,
      indices: torch.Tensor,
      kernel_size: Union[Tuple[int], int],
      /,
      *,
      strides: Optional[Union[int, Tuple[int]]] = None,
      padding: Union[int, Tuple[int]] = 0,
      data_format: Optional[str] = "NCW",
  ) -> torch.Tensor:
      if strides is None:
          strides = kernel_size
      revert = False
      if data_format in ["NCW", "NWC"]:
          if data_format == "NWC":
              input = input.permute(0, 2, 1)
              indices = indices.permute(0, 2, 1)
              revert = True
      else:
          raise ValueError(
              f"data_format attr should be NCW or NWC but found {data_format}"
          )
      kernel_size = _broadcast_pooling_helper(
          kernel_size, "1d", name="kernel_size"
      )
      padding = _broadcast_pooling_helper(padding, "1d", name="padding")
      strides = _broadcast_pooling_helper(strides, "1d", name="strides")
      ret = torch.nn.functional.max_unpool1d(
          input,
          indices,
          kernel_size,
          strides,
          padding,
      )
      if revert:
          ret = ret.permute(0, 2, 1)
      return ret
  
imports: from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
  import torch
  import math
  import ivy
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from .None import backend_version
  from ivy.functional.ivy.layers import _handle_padding, _get_num_padded_values, _validate_max_pool_params, _depth_max_pooling_helper
  from ivy.functional.ivy.experimental.layers import _padding_ceil_mode, _broadcast_pooling_helper
label_desc: Use image node_id 30 for calling a global function with example usage: max_unpool1d() and returns: ret