def _create_join_index(self, index, other_index, indexer,<EOL>other_indexer, how='<STR_LIT:left>'):
join_index = index.take(indexer)<EOL>if (self.how in (how, '<STR_LIT>') and<EOL>not isinstance(other_index, MultiIndex)):<EOL><INDENT>mask = indexer == -<NUM_LIT:1><EOL>if np.any(mask):<EOL><INDENT>join_list = join_index.to_numpy()<EOL>other_list = other_index.take(other_indexer).to_numpy()<EOL>join_list[mask] = other_list[mask]<EOL>join_index = Index(join_list, dtype=join_index.dtype,<EOL>name=join_index.name)<EOL><DEDENT><DEDENT>return join_index<EOL>
Create a join index by rearranging one index to match another

Parameters
----------
index: Index being rearranged
other_index: Index used to supply values not found in index
indexer: how to rearrange index
how: replacement is only necessary if indexer based on other_index

Returns
-------
join_index