def get_namespace(self, name_seq):
namespaces = self.namespaces<EOL>result = []<EOL>for name in name_seq:<EOL><INDENT>namespaces = namespaces.get(name)<EOL>if not namespaces:<EOL><INDENT>break<EOL><DEDENT>result.append(name)<EOL><DEDENT>return result<EOL>
Returns the prefix of names from name_seq that are known namespaces.

        Args:
          name_seq: ['names', 'of', 'possible', 'namespace', 'to', 'find']

        Returns:
          ['names', 'that', 'are', 'namespaces', 'possibly', 'empty', 'list']