Returns Type `name`, with preference for the Type of `api`.

        :param str name: Type name
        :param str api: api name to prefer, of None to prefer types with no
                        api name
        :return: Type object

def get_type(self, name, api=None):
        """Returns Type `name`, with preference for the Type of `api`.

        :param str name: Type name
        :param str api: api name to prefer, of None to prefer types with no
                        api name
        :return: Type object
        """
        k = (name, api)
        if k in self.types:
            return self.types[k]
        else:
            return self.types[(name, None)]