def convert_func(self, func):
        """
        Converts NeuroML arithmetic/logical functions to python equivalents.

        @param func: NeuroML function
        @type func: string


        @return: Python operator
        @rtype: string
        """

        if func == 'ln':
            return 'log'
        elif func == 'random':
            return 'random.uniform'
        elif func == 'H':
            def heaviside_step(x):
                if x < 0: return 0
                elif x > 0: return 1
                else: return 0.5 
            return 'heaviside_step'
        else:
            return func