def _get_var_info(self, node):
        """Collect any variable metadata from the
        model here.
        """
        info = { 'size': 0 }

        base = None
        noflat = False

        if isinstance(node, tuple):
            # use the name of the src
            name = node[0]
            for n in simple_node_iter(node):
                if self.get_metadata(n.split('[',1)[0], 'noflat'):
                    noflat = True
                    break
        else:
            name = node

        parts = name.split('.',1)
        if 1 > len(parts):
            cname, vname = parts
            child = getattr(self, cname)
        else:
            cname, vname = '', name
            child = self

        try:
            # TODO: add checking of local_size metadata...
            val, idx = get_val_and_index(child, vname)

            if isinstance(val, real_types):
                info['scalar'] = True

            if hasattr(val, 'shape'):
                info['shape'] = val.shape

            if '[' in vname:  # array index into basevar
                base = vname.split('[',1)[0]
                flat_idx = to_idx_array(get_flattened_index(idx,
                                        get_var_shape(base, child),
                                        cvt_to_slice=False))
            else:
                base = None
                flat_idx = None

            info['size'] = flattened_size(vname, val, scope=child)
            if flat_idx is not None:
                info['flat_idx'] = flat_idx

        except NoFlatError:
            info['noflat'] = True

        if base is not None:
            if cname:
                bname = '.'.join((cname, base))
            else:
                bname = base
            info['basevar'] = bname

        # get any other metadata we want
        meta = child.get_metadata(vname)
        for mname in ['deriv_ignore']:
            if meta.get(mname) is not None:
                info[mname] = meta

        if noflat:
            info['noflat'] = True

        return info
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/assembly.py/Assembly._get_var_info/swapped operands of `>`