'Checks to see if fullname (e.g. cython.parallel.prange) is a valid
parallel directive. If it is a star import it also updates the
parallel_directives.'

def is_parallel_directive(self, full_name, pos):

    result = (full_name + '.').startswith('cython.parallel.')
    if result:
        directive = full_name.split('.')
        if (full_name == u'cython.parallel'):
            self.parallel_directives[u'parallel'] = u'cython.parallel'
        elif (full_name == u'cython.parallel.*'):
            for name in self.valid_parallel_directives:
                self.parallel_directives[name] = (u'cython.parallel.%s' % name)
        elif ((len(directive) != 3) or (directive[(-1)] not in self.valid_parallel_directives)):
            error(pos, ('No    such    directive:    %s' % full_name))
        self.module_scope.use_utility_code(UtilityCode.load_cached('InitThreads', 'ModuleSetupCode.c'))
    return result
