code: def _valid_shapes(
      input, weight, bias, stride, padding, groups, transpose=False
  ):
      in_channels = input.shape[1]
      out_channels = (
          weight.shape[0] if not transpose else weight.shape[1] * groups
      )
  
      ivy.utils.assertions.check_equal(
          in_channels % groups,
          0,
          message="in_channels must be divisible by groups",
          as_array=False,
      )
      ivy.utils.assertions.check_equal(
          out_channels % groups,
          0,
          message="out_channels must be divisible by groups",
          as_array=False,
      )
  
      if bias is not None:
          ivy.utils.assertions.check_equal(
              bias.shape[0],
              out_channels,
              message="bias must be same shape as out_channels",
              as_array=False,
          )
  
      if padding == "same":
          if isinstance(stride, int):
              ivy.utils.assertions.check_equal(
                  stride,
                  1,
                  message="padding cannot be 'same' for stride > 1",
                  as_array=False,
              )
          else:
              for i in stride:
                  ivy.utils.assertions.check_equal(
                      i,
                      1,
                      message="padding cannot be 'same' for stride > 1",
                      as_array=False,
                  )
  
      if not transpose:
          in_channels_by_groups = weight.shape[1]
          ivy.utils.assertions.check_equal(
              in_channels,
              in_channels_by_groups * groups,
              message="in_channels must be consistent between input and weight",
              as_array=False,
          )
      else:
          ivy.utils.assertions.check_equal(
              in_channels,
              weight.shape[0],
              message="in_channels must be consistent between input and weight",
              as_array=False,
          )
  
imports: import ivy
  from ivy.func_wrapper import with_supported_dtypes
  from ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back
  from ivy.functional.ivy.experimental.layers import _broadcast_pooling_helper
label_desc: Use image node_id 2 for calling a global function with example usage: _valid_shapes(input, weight, bias, stride, padding, groups, transpose) without return types