def remove_namespace(doc, namespace):
    """
    Takes in a ElementTree object and namespace value.  The length of that
    namespace value is removed from all Element nodes within the document.
    This effectively removes the namespace from that document.

    :param doc: lxml.etree
    :param namespace: Namespace that needs to be removed.
    :return: Returns the source document with namespaces removed.
    """
    ns = '{{{}}}'.format(namespace)
    nsl = len(ns)
    for elem in doc.getiterator():
        if elem.tag.startswith(ns):
            elem.tag = elem.tag[nsl:]
    return doc
