<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def element_creator(namespace=None):
 """Create a simple namespace-aware objectify element creator. Args: namespace (str):
 Namespace to work in Returns: function: Namespace-aware element creator """

    ELEMENT_MAKER = _objectify.ElementMaker(namespace=namespace,
                                            annotate=False)

    def create_elem(tag, attr=None, text=None):
        """:class:`objectify.Element` wrapper with namespace defined.

        Args:
            tag (str): Tag name
            attr (dict): Default attributes for tag
            text (str): Text content for the tag

        Returns:
            _objectify.ObjectifiedElement: objectify element
        """
        if not attr:
            attr = {}
        if text:
            element = getattr(ELEMENT_MAKER, tag)(text, **attr)
        else:
            element = getattr(ELEMENT_MAKER, tag)(**attr)
        return element

    return create_elem