def _actual_key(self, key):
if key in self or key in ("<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>return key<EOL><DEDENT>elif (self.default_namespace, key) in self:<EOL><INDENT>return (self.default_namespace, key)<EOL><DEDENT>if isinstance(key, str) and self.coco:<EOL><INDENT>new = coco.convert(names=[key], to='<STR_LIT>', not_found=None)<EOL>if new in self:<EOL><INDENT>if new not in self.__seen:<EOL><INDENT>self.__seen.add(key)<EOL>print("<STR_LIT>".format(new, key))<EOL><DEDENT>return new<EOL><DEDENT><DEDENT>raise KeyError("<STR_LIT>")<EOL>
Translate provided key into the key used in the topology. Tries the unmodified key, the key with the default namespace, and the country converter. Raises a ``KeyError`` if none of these finds a suitable definition in ``self.topology``.