class_docstr: Base class for nested array objects.
class_docstr_tok: ["Base","class","for","nested","array","objects","."]
code: def broadcast_shapes(shapes):
      z = []
      max_length = max(len(x) for x in shapes)
      shape_list = list(shapes)
      # making every shape the same length
      for i, shape in enumerate(shapes):
          if len(shape) != max_length:
              shape_list[i] = [1] * (max_length - len(shape)) + shape
      # broadcasting
      for x in zip(*shape_list):
          if None in x:
              for dims in x:
                  if dims is not None and dims != 1:
                      raise ValueError(
                          f"Shapes {shapes[0]} and {shapes[1]} are not broadcastable"
                      )
              z.append(None)
          elif 1 in x:
              dim_exist = False
              for dims in x:
                  if dims != 1:
                      z.append(dims)
                      if dim_exist:
                          raise ValueError(
                              f"Shapes {shapes[0]} and {shapes[1]} are not"
                              " broadcastable"
                          )
                      else:
                          dim_exist = True
              if not dim_exist:
                  z.append(1)
          elif len(set(x)) == 1:
              z.append(x[0])
          else:
              raise ValueError(
                  f"Shapes {shapes[0]} and {shapes[1]} are not broadcastable"
              )
      return z
  
imports: import abc
  from typing import List, Tuple
  import ivy
label_desc: Use image node_id 6 for calling the NestedArrayBase obj's underlying member method code with example usage: obj.broadcast_shapes(shapes) and returns: z