def METHOD_NAME(val_in):
    if isinstance(val_in, dict):
        val = dict()
        for k, v in val_in.items():
            val[k] = METHOD_NAME(v)
    elif isinstance(val_in, str):
        # exponential formatting
        val = val_in.strip().split()
        if len(val) == 1:
            val = val[0]
            re_float = r'(\d*\.*\d*)d(\-*\+*\d+)'
            val = re.sub(re_float, r'\1e\2', val)
            if val.isdecimal():
                val = int(val)
            elif val == 'true' or val == 'false':
                val = val == 'true'
            else:
                try:
                    val = float(val)
                except Exception:
                    pass
        else:
            val = [METHOD_NAME(v) for v in val]
    elif isinstance(val_in, list):
        try:
            val = [v.split() if isinstance(v, str) else v for v in val_in]
            val = [v[0] if (isinstance(v, list) and len(v) == 1) else v for v in val]
            val = np.array(val, dtype=float)
            if np.all(np.mod(val, 1) == 0):
                val = np.array(val, dtype=int)
        except Exception:
            val = [METHOD_NAME(v) for v in val_in]
    return val