<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def child_at_index(self, name, index):
 """ Return the child named `name` at the given index :type name: ``str`` :param name: child name (e.g. PID) :type index: ``int`` :param index: child index :return: an instance of :class:`Element <hl7apy.core.Element>` subclass """


        def _finder(n, i):
            try:
                return self.indexes[n][i]
            except (KeyError, IndexError):
                try:
                    return self.traversal_indexes[n][i]
                except (KeyError, IndexError):
                    return None

        child = _finder(name, index)
        child_name = None if name is None else self._find_name(name)
        if child_name != name:
            child = _finder(child_name, index)
        return child