<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_touch_dict(self, ind=None, out=bool):
 """ Get a dictionnary of Cls_Name struct with indices of Rays touching Only includes Struct object with compute = True (as returned by self.lStruct__computeInOut_computeInOut) Also return the associated colors If in is not None, the indices for each Struct are split between: - indok : rays touching Struct and in ind - indout: rays touching Struct but not in ind """

        if self.config is None:
            msg = "Config must be set in order to get touch dict !"
            raise Exception(msg)

        dElt = {}
        ind = self._check_indch(ind, out=bool)
        for ss in self.lStruct_computeInOut:
            kn = "%s_%s"%(ss.__class__.__name__, ss.Id.Name)
            indtouch = self.select(touch=kn, out=bool)
            if np.any(indtouch):
                indok  = indtouch & ind
                indout = indtouch & ~ind
                if np.any(indok) or np.any(indout):
                    if out == int:
                        indok  = indok.nonzero()[0]
                        indout = indout.nonzero()[0]
                    dElt[kn] = {'indok':indok, 'indout':indout,
                                'col':ss.get_color()}
        return dElt