docstr: Returns MutableDenseNDimArray instance with new shape. Elements number
  must be        suitable to new shape. The only argument of method sets
  new shape.
  
  Examples
  ========
  
  >>> from sympy import MutableDenseNDimArray
  >>> a = MutableDenseNDimArray([1, 2, 3, 4, 5, 6], (2, 3))
  >>> a.shape
  (2, 3)
  >>> a
  [[1, 2, 3], [4, 5, 6]]
  >>> b = a.reshape(3, 2)
  >>> b.shape
  (3, 2)
  >>> b
  [[1, 2], [3, 4], [5, 6]]
docstr_tok: ["Returns","MutableDenseNDimArray","instance","with","new","shape",".","Elements","number","must","be","suitable","to","new","shape",".","The","only","argument","of","method","sets","new","shape",".","Examples","========",">",">",">","from","sympy","import","MutableDenseNDimArray",">",">",">","a","=","MutableDenseNDimArray","(","[","1",",","2",",","3",",","4",",","5",",","6","]",",","(","2",",","3",")",")",">",">",">","a.shape","(","2",",","3",")",">",">",">","a","[","[","1",",","2",",","3","]",",","[","4",",","5",",","6","]","]",">",">",">","b","=","a.reshape","(","3",",","2",")",">",">",">","b.shape","(","3",",","2",")",">",">",">","b","[","[","1",",","2","]",",","[","3",",","4","]",",","[","5",",","6","]","]"]
code: def reshape(self, *newshape):
      """
      Returns MutableDenseNDimArray instance with new shape. Elements number
      must be        suitable to new shape. The only argument of method sets
      new shape.
  
      Examples
      ========
  
      >>> from sympy import MutableDenseNDimArray
      >>> a = MutableDenseNDimArray([1, 2, 3, 4, 5, 6], (2, 3))
      >>> a.shape
      (2, 3)
      >>> a
      [[1, 2, 3], [4, 5, 6]]
      >>> b = a.reshape(3, 2)
      >>> b.shape
      (3, 2)
      >>> b
      [[1, 2], [3, 4], [5, 6]]
  
      """
      new_total_size = functools.reduce(lambda x, y: x * y, newshape)
      if new_total_size != self._loop_size:
          raise ValueError(
              "Expecting reshape size to %d but got prod(%s) = %d"
              % (self._loop_size, str(newshape), new_total_size)
          )
  
      # there is no `.func` as this class does not subtype `Basic`:
      return type(self)(self._array, newshape)
  
imports: import functools
  from typing import List
  from sympy.core.basic import Basic
  from sympy.core.containers import Tuple
  from sympy.core.singleton import S
  from sympy.core.sympify import _sympify
  from sympy.tensor.array.mutable_ndim_array import MutableNDimArray
  from sympy.tensor.array.ndim_array import NDimArray, ImmutableNDimArray, ArrayKind
  from sympy.utilities.iterables import flatten
label_desc: Use image node_id 6 for calling the DenseNDimArray obj's underlying member method code with example usage: obj.reshape() and returns: type