<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_doctype(self, index, name):
 """ Returns a doctype given an index and a name """

        if index not in self.indices:
            self.get_all_indices()
        return self.indices.get(index, {}).get(name, None)