'Given a plain source namespace, return the corresponding Namespace
object, or None if it is not included.'

def lookup(self, plain_src_ns):

    if (plain_src_ns in self._ex_namespace_set):
        return None
    if ((not self._regex_map) and (not self._plain)):
        return Namespace(dest_name=plain_src_ns, source_name=plain_src_ns, include_fields=self._include_fields, exclude_fields=self._exclude_fields)
    try:
        return self._plain[plain_src_ns]
    except KeyError:
        for (regex, namespace) in self._regex_map:
            new_name = match_replace_regex(regex, plain_src_ns, namespace.dest_name)
            if (not new_name):
                continue
            new_namespace = namespace.with_options(dest_name=new_name, source_name=plain_src_ns)
            self._add_plain_namespace(new_namespace)
            return new_namespace
    self._ex_namespace_set.add(plain_src_ns)
    return None
