Replace callables with tokens to reduce object memory footprint.

        A callable token is an integer that denotes the order in which the
        callable was encountered by the encoder, i.e. the first callable
        encoded is assigned token 0, the second callable encoded is assigned
        token 1, etc.

        :param call: Callable name
        :type  call: string

        :rtype: string

def encode_call(self, call):
        """
        Replace callables with tokens to reduce object memory footprint.

        A callable token is an integer that denotes the order in which the
        callable was encountered by the encoder, i.e. the first callable
        encoded is assigned token 0, the second callable encoded is assigned
        token 1, etc.

        :param call: Callable name
        :type  call: string

        :rtype: string
        """
        # Callable name is None when callable is part of exclude list
        if call is None:
            return None
        itokens = call.split(self._callables_separator)
        otokens = []
        for itoken in itokens:
            otoken = self._clut.get(itoken, None)
            if not otoken:
                otoken = str(len(self._clut))
                self._clut[itoken] = otoken
            otokens.append(otoken)
        return self._callables_separator.join(otokens)