Construct a DataArray by indexing this dataset

def _construct_dataarray(self, name) -> 'DataArray':
        """Construct a DataArray by indexing this dataset
        """
        from .dataarray import DataArray

        try:
            variable = self._variables[name]
        except KeyError:
            _, name, variable = _get_virtual_variable(
                self._variables, name, self._level_coords, self.dims)

        needed_dims = set(variable.dims)

        coords = OrderedDict()  # type: OrderedDict[Any, Variable]
        for k in self.coords:
            if set(self.variables[k].dims) <= needed_dims:
                coords[k] = self.variables[k]

        if self._indexes is None:
            indexes = None
        else:
            indexes = OrderedDict((k, v) for k, v in self._indexes.items()
                                  if k in coords)

        return DataArray(variable, coords, name=name, indexes=indexes,
                         fastpath=True)