def convert_src_inds(parent_src_inds, parent_src_shape, my_src_inds, my_src_shape):
    '\n    Compute lower level src_indices based on parent src_indices.\n\n    Parameters\n    ----------\n    parent_src_inds : ndarray\n        Parent src_indices.\n    parent_src_shape : tuple\n        Shape of source expected by parent.\n    my_src_inds : ndarray or fancy index\n        Src_indices at the current system level, before conversion.\n    my_src_shape : tuple\n        Expected source shape at the current system level.\n\n    Returns\n    -------\n    ndarray\n        Final src_indices based on those of the parent.\n    '
    if (parent_src_inds is None):
        return my_src_inds
    elif (my_src_inds is None):
        return parent_src_inds
    if my_src_inds._flat_src:
        return parent_src_inds.shaped_array(flat=True)[my_src_inds.flat()]
    else:
        return parent_src_inds.shaped_array(flat=False).reshape(my_src_shape)[my_src_inds()]
Compute lower level src_indices based on parent src_indices.

Parameters
----------
parent_src_inds : ndarray
    Parent src_indices.
parent_src_shape : tuple
    Shape of source expected by parent.
my_src_inds : ndarray or fancy index
    Src_indices at the current system level, before conversion.
my_src_shape : tuple
    Expected source shape at the current system level.

Returns
-------
ndarray
    Final src_indices based on those of the parent.
def convert_src_inds(parent_src_inds, parent_src_shape, my_src_inds, my_src_shape):
    '\n    Compute lower level src_indices based on parent src_indices.\n\n    Parameters\n    ----------\n    parent_src_inds : ndarray\n        Parent src_indices.\n    parent_src_shape : tuple\n        Shape of source expected by parent.\n    my_src_inds : ndarray or fancy index\n        Src_indices at the current system level, before conversion.\n    my_src_shape : tuple\n        Expected source shape at the current system level.\n\n    Returns\n    -------\n    ndarray\n        Final src_indices based on those of the parent.\n    '
    if (parent_src_inds is None):
        return my_src_inds
    elif (my_src_inds is None):
        return parent_src_inds
    if my_src_inds._flat_src:
        return parent_src_inds.shaped_array(flat=True)[my_src_inds.flat()]
    else:
        return parent_src_inds.shaped_array(flat=False).reshape(my_src_shape)[my_src_inds()]