def METHOD_NAME(self, k: int, etype: Union[int, str]):
    from ...quadrature import TriangleQuadrature, GaussLegendreQuadrature
    if etype in {'cell', 2}:
        return TriangleQuadrature(index=k)
    elif etype in {'edge', 'face', 1}:
        return GaussLegendreQuadrature(k)
    else:
        raise ValueError(f"Invalid entity type '{etype}'.")