def get_local_order_parameters(self, structure, n):
        """
        Calculate those local structure order parameters for
        the given site whose ideal CN corresponds to the
        underlying motif (e.g., CN=4, then calculate the
        square planar, tetrahedral, see-saw-like,
        rectangular see-saw-like order paramters).

        Args:
            structure: Structure object
            n (int): site index.

        Returns (Dict[str, float]):
            A dict of order parameters (values) and the
            underlying motif type (keys; for example, tetrahedral).

        """
        # code from @nisse3000, moved here from graphs to avoid circular
        # import, also makes sense to have this as a general NN method
        cn = self.get_cn(structure, n)
        if cn in [int(k_cn) for k_cn in cn_opt_params.keys()]:
            names = [k for k in cn_opt_params[cn].keys()]
            types = []
            params = []
            for name in names:
                types.append(cn_opt_params[cn][name][0])
                tmp = cn_opt_params[cn][name][1] \
                    if len(cn_opt_params[cn][name]) > 1 else None
                params.append(tmp)
            lostops = LocalStructOrderParams(types, parameters=params)
            sites = [structure[n]] + self.get_nn(structure, n)
            lostop_vals = lostops.get_order_parameters(
                sites, 0, indices_neighs=[i for i in range(1, cn + 1)])
            d = {}
            for i, lostop in enumerate(lostop_vals):
                d[names[i]] = lostop
            return d
        else:
            return None