'Transform ``data`` to array. The parameter ``data`` may
contain data in various formats, e.g. nested lists, sympy ``Matrix``,
and so on.
Examples
>>> from sympy.tensor.tensor import _TensorDataLazyEvaluator
>>> _TensorDataLazyEvaluator.parse_data([1, 3, -6, 12])
[1, 3, -6, 12]
>>> _TensorDataLazyEvaluator.parse_data([[1, 2], [4, 7]])
[[1, 2], [4, 7]]'

@staticmethod
def parse_data(data):

    from .array import MutableDenseNDimArray
    if (not isinstance(data, MutableDenseNDimArray)):
        if ((len(data) == 2) and hasattr(data[0], '__call__')):
            data = MutableDenseNDimArray(data[0], data[1])
        else:
            data = MutableDenseNDimArray(data)
    return data
