def METHOD_NAME(fid, node, matkind, indent="    ", transpose=False):
    """Read named matrix from the given node.
    Parameters
    ----------
    fid : file
        The opened file descriptor.
    node : dict
        The node in the tree.
    matkind : int
        The type of matrix.
    transpose : bool
        If True, transpose the matrix. Default is False.
    %(verbose)s
    Returns
    -------
    mat: dict
        The matrix data
    """
    #   Descend one level if necessary
    if node["block"] != FIFF.FIFFB_MNE_NAMED_MATRIX:
        for k in range(node["nchild"]):
            if node["children"][k]["block"] == FIFF.FIFFB_MNE_NAMED_MATRIX:
                if has_tag(node["children"][k], matkind):
                    node = node["children"][k]
                    break
        else:
            logger.info(
                indent + "Desired named matrix (kind = %d) not " "available" % matkind
            )
            return None
    else:
        if not has_tag(node, matkind):
            logger.info(
                indent + "Desired named matrix (kind = %d) not " "available" % matkind
            )
            return None
    #   Read everything we need
    tag = find_tag(fid, node, matkind)
    if tag is None:
        raise ValueError("Matrix data missing")
    else:
        data = tag.data
    nrow, ncol = data.shape
    tag = find_tag(fid, node, FIFF.FIFF_MNE_NROW)
    if tag is not None and tag.data != nrow:
        raise ValueError(
            "Number of rows in matrix data and FIFF_MNE_NROW " "tag do not match"
        )
    tag = find_tag(fid, node, FIFF.FIFF_MNE_NCOL)
    if tag is not None and tag.data != ncol:
        raise ValueError(
            "Number of columns in matrix data and " "FIFF_MNE_NCOL tag do not match"
        )
    tag = find_tag(fid, node, FIFF.FIFF_MNE_ROW_NAMES)
    row_names = tag.data.split(":") if tag is not None else []
    tag = find_tag(fid, node, FIFF.FIFF_MNE_COL_NAMES)
    col_names = tag.data.split(":") if tag is not None else []
    mat = dict(
        nrow=nrow, ncol=ncol, row_names=row_names, col_names=col_names, data=data
    )
    if transpose:
        _transpose_named_matrix(mat)
    return mat