def METHOD_NAME(self, i: int):
    """Deduce component and basis function for i'th index."""
    counts = np.sum(np.array([e._bfun_counts()
                              for e in self.elems]), axis=0)
    tmp: List[Any] = []
    ns: List[Any] = []
    if counts[0] > 0:
        tmp = sum([[j] * self.elems[j].nodal_dofs
                   for j in range(len(self.elems))], [])
        ns += sum([tmp for j in range(int(counts[0] / len(tmp)))], [])
    if counts[1] > 0:
        tmp = sum([[j] * self.elems[j].edge_dofs
                   for j in range(len(self.elems))], [])
        ns += sum([tmp for j in range(int(counts[1] / len(tmp)))], [])
    if counts[2] > 0:
        tmp = sum([[j] * self.elems[j].facet_dofs
                   for j in range(len(self.elems))], [])
        ns += sum([tmp for j in range(int(counts[2] / len(tmp)))], [])
    if counts[3] > 0:
        tmp = sum([[j] * self.elems[j].interior_dofs
                   for j in range(len(self.elems))], [])
        ns += sum([tmp for j in range(int(counts[3] / len(tmp)))], [])
    mask = np.array(ns)
    inds = mask.copy()
    for j in range(len(self.elems)):
        maskj = mask == j
        total = np.sum(maskj)
        seq = np.arange(total, dtype=np.int_)
        inds[maskj] = seq
    return ns[i], inds[i]