def METHOD_NAME(
    mesh,
    allowable_types=None,
    force_linear=False,
    null_unallowed=False,
    fix_midside=True,
    additional_checking=False,
):
    """Convert raw ANSYS nodes and elements to a VTK UnstructuredGrid
    Parameters
    ----------
    fix_midside : bool, optional
        Adds additional midside nodes when ``True``.  When
        ``False``, missing ANSYS cells will simply point to the
        first node.
    """
    if not mesh._has_nodes or not mesh._has_elements:
        # warnings.warn('Missing nodes or elements.  Unable to parse to vtk')
        return
    etype_map = ETYPE_MAP
    if allowable_types is not None:
        try:
            allowable_types = np.asarray(allowable_types)
        except:
            raise INVALID_ALLOWABLE_TYPES
        if not issubclass(allowable_types.dtype.type, np.integer):
            raise TypeError("Element types must be an integer array-like")
        if allowable_types.min() < 1 or allowable_types.max() > 300:
            raise INVALID_ALLOWABLE_TYPES
        etype_map = np.zeros_like(ETYPE_MAP)
        etype_map[allowable_types] = ETYPE_MAP[allowable_types]
    # ANSYS element type to VTK map
    type_ref = np.empty(2 << 16, np.int32)  # 131072
    type_ref[mesh._ekey[:, 0]] = etype_map[mesh._ekey[:, 1]]
    if allowable_types is None or 200 in allowable_types:
        for etype_ind, etype in mesh._ekey:
            # MESH200
            if etype == 200 and etype_ind in mesh.key_option:
                # keyoption 1 contains various cell types
                # map them to the corresponding type (see elements.py)
                mapped = MESH200_MAP[mesh.key_option[etype_ind][0][1]]
                type_ref[etype_ind] = mapped
            # TARGE170 specifics
            if etype == 170:
                # edge case where missing element within the tshape_key
                if etype_ind not in mesh.tshape_key:  # pragma: no cover
                    continue
                tshape_num = mesh.tshape_key[etype_ind]
                if tshape_num >= 19:  # weird bug when 'PILO' can be 99 instead of 19.
                    tshape_num = 19
                tshape_label = SHAPE_MAP[tshape_num]
                type_ref[etype_ind] = TARGE170_MAP.get(tshape_label, 0)
    nodes, angles, nnum = mesh.nodes, mesh.node_angles, mesh.nnum
    offset, celltypes, cells = _reader.ans_vtk_convert(
        mesh._elem, mesh._elem_off, type_ref, nnum, True
    )  # for reset_midside
    # fix missing midside
    if np.any(cells == -1):
        if fix_midside:
            nodes, angles, nnum = fix_missing_midside(
                cells, nodes, celltypes, offset, angles, nnum
            )
        else:
            cells[cells == -1] = 0
    if additional_checking:
        cells[cells < 0] = 0
        # cells[cells >= nodes.shape[0]] = 0  # fails when n_nodes < 20
    grid = pv.UnstructuredGrid(cells, celltypes, nodes, deep=True)
    # Store original ANSYS element and node information
    try:
        grid.point_data["ansys_node_num"] = nnum
    except ValueError:
        grid.point_data["ansys_node_num"] = (
            mesh._mapdl.nlist(kinternal="internal").to_array()[:, 0].astype(np.int32)
        )
    grid.cell_data["ansys_elem_num"] = mesh.enum
    grid.cell_data["ansys_real_constant"] = mesh.elem_real_constant
    grid.cell_data["ansys_material_type"] = mesh.material_type
    grid.cell_data["ansys_etype"] = mesh._ans_etype
    grid.cell_data["ansys_elem_type_num"] = mesh.etype
    # add components
    # Add element components to unstructured grid
    for key, item in mesh.element_components.items():
        mask = np.in1d(mesh.enum, item, assume_unique=True)
        grid.cell_data[key] = mask
    # Add node components to unstructured grid
    for key, item in mesh.node_components.items():
        mask = np.in1d(nnum, item, assume_unique=True)
        grid.point_data[key] = mask
    # store node angles
    if angles is not None:
        if angles.shape[1] == 3:
            grid.point_data["angles"] = angles
    if not null_unallowed:
        grid = grid.extract_cells(grid.celltypes != 0)
    if force_linear:
        # only run if the grid has points or cells
        if grid.n_points:
            grid = grid.linear_copy()
    # map over element types
    # Add tracker for original node numbering
    ind = np.arange(grid.n_points)
    grid.point_data["origid"] = ind
    grid.point_data["VTKorigID"] = ind
    return grid