def has_global_vars(self, *vars):
        """Are there given global variables?

        :param vars: Variable names or instances of :class:`.Variable`.

        Example:

        .. code-block:: python

            module.has_global_vars('g1', 'g2')
            module.has_global_vars('g1', var1)

        The order is irrelevant. If you want to check that only the given
        global variables appear in the module and no other other global
        variables are present, use :func:`has_global_vars()` instead.

        If you call this method without any arguments, it checks whether there
        is at least one global variable in the module:

        .. code-block:: python

            module.has_global_vars()
        """
        names = get_set_of_names(vars)
        if not names:
            return self.global_var_count > 0
        return names.issubset(set(self.global_var_names))
    def has_named_enums(self, *enums):
        """Are there given named enums?

        :param enums: Enum names or instances of :class:`.EnumType`.

        Example:

        .. code-block:: python

            module.has_named_enums('e1', 'e2')
            module.has_named_enums('e1', enum)

        The order is irrelevant. If you want to check that only the given
        named enums appear in the module and no other named enums
        are present, use :func:`has_just_named_enums()` instead.

        If you call this method without any arguments, it checks whether there
        is at least one enum in the module:

        .. code-block:: python

            module.has_named_enums()
        """
        names = get_set_of_names(enums)
        if not names:
            return self.has_any_named_enums()
        return names.issubset(set(self.enum_names))
    def has_named_unions(self, *unions):
        """Are there given named unions?

        :param unions: Union names or instances of :class:`.UnionType`.

        Example:

        .. code-block:: python

            module.has_named_unions('u1', 'u2')
            module.has_named_unions('u1', union)

        The order is irrelevant. If you want to check that only the given
        named unions appear in the module and no other named unions
        are present, use :func:`has_just_named_unions()` instead.

        If you call this method without any arguments, it checks whether there
        is at least one union in the module:

        .. code-block:: python

            module.has_named_unions()
        """
        names = get_set_of_names(unions)
        if not names:
            return self.has_any_named_unions()
        return names.issubset(set(self.union_names))
    def has_named_structs(self, *structs):
        """Are there given named structures?

        :param structs: Structure names or instances of :class:`.StructType`.

        Example:

        .. code-block:: python

            module.has_named_structs('s1', 's2')
            module.has_named_structs('s1', struct)

        The order is irrelevant. If you want to check that only the given
        named structures appear in the module and no other named structures
        are present, use :func:`has_just_named_structs()` instead.

        If you call this method without any arguments, it checks whether there
        is at least one struct in the module:

        .. code-block:: python

            module.has_named_structs()
        """
        names = get_set_of_names(structs)
        if not names:
            return self.has_any_named_structs()
        return names.issubset(set(self.struct_names))
    def has_funcs(self, *functions):
        """Are there given functions?

        :param functions: Function names or instances of :class:`.Function`.

        Example:

        .. code-block:: python

            module.has_funcs('func1', 'func2')
            module.has_funcs('func1', foo)

        The order is irrelevant. If you want to check that only the given
        functions appear in the module and no other functions, use
        :func:`has_just_funcs()` instead.

        If you call this method without any arguments, it checks whether there
        is at least one function in the module:

        .. code-block:: python

            module.has_funcs()
        """
        names = get_set_of_names(functions)
        if not names:
            return self.func_count > 0
        return names.issubset(set(self.func_names))
    def has_just_funcs(self, *functions):
        """Are there only given functions?
        Names as strings or objects of :class:`.Function` can be used as parameters.

        Example:

        .. code-block:: python

            module.has_just_funcs('func1', 'func2')
            module.has_just_funcs('func1', foo)

        The order is irrelevant.
        """
        return set(self.func_names) == get_set_of_names(functions)
    def has_just_named_enums(self, *enums):
        """Are there only given named enums?

        :param enums: Enum names or instances of :class:`.EnumType`.

        Example:

        .. code-block:: python

            module.has_just_named_enums('e1', 'e2')
            module.has_just_named_enums('e1', enum)

        The order is irrelevant.
        """
        return set(self.enum_names) == get_set_of_names(enums)
    def has_just_named_unions(self, *unions):
        """Are there only given named unions?

        :param unions: Union names or instances of :class:`.UnionType`.

        Example:

        .. code-block:: python

            module.has_just_named_unions('u1', 'u2')
            module.has_just_named_unions('u1', union)

        The order is irrelevant.
        """
        return set(self.union_names) == get_set_of_names(unions)
    def has_just_named_structs(self, *structs):
        """Are there only given named structures?

        :param structs: Structure names or instances of :class:`.StructType`.

        Example:

        .. code-block:: python

            module.has_just_named_structs('s1', 's2')
            module.has_just_named_structs('s1', struct)

        The order is irrelevant.
        """
        return set(self.struct_names) == get_set_of_names(structs)
    def has_just_global_vars(self, *vars):
        """Are there only specified global variables?

        :param vars: Variable names or instances of :class:`.Variable`.

        Example:

        .. code-block:: python

            module.has_just_global_vars('g1', 'g2')
            module.has_just_global_vars('g', var)

        The order is irrelevant.
        """
        return set(self.global_var_names) == get_set_of_names(vars)
    def calls(self, *functions):
        """Are the given functions called inside the function's body?

        Names as strings or objects of :class:`.Function` can be used.

        Examples:

        .. code-block:: python

            func.calls('other_func')
            func.calls('rand', 'printf')
            func.calls(function1, function2)

        The order is irrelevant. At least one name has to be provided.
        """
        names = get_set_of_names(functions)
        if not names:
            raise AssertionError('at least one function name has to be given')
        return names.issubset(self.called_func_names)