def _get_reindexer(self, target):
<EOL>left = self._maybe_convert_i8(target.left)<EOL>right = self._maybe_convert_i8(target.right)<EOL>lindexer = self._engine.get_indexer(left.values)<EOL>rindexer = self._engine.get_indexer(right.values)<EOL>indexer = []<EOL>n = len(self)<EOL>for i, (lhs, rhs) in enumerate(zip(lindexer, rindexer)):<EOL><INDENT>target_value = target[i]<EOL>if (lhs != -<NUM_LIT:1> and<EOL>self.closed == '<STR_LIT:right>' and<EOL>target_value.left == self[lhs].right):<EOL><INDENT>lhs += <NUM_LIT:1><EOL><DEDENT>if (rhs != -<NUM_LIT:1> and<EOL>self.closed == '<STR_LIT:left>' and<EOL>target_value.right == self[rhs].left):<EOL><INDENT>rhs -= <NUM_LIT:1><EOL><DEDENT>if lhs == -<NUM_LIT:1> and rhs == -<NUM_LIT:1>:<EOL><INDENT>indexer.append(np.array([-<NUM_LIT:1>]))<EOL><DEDENT>elif rhs == -<NUM_LIT:1>:<EOL><INDENT>indexer.append(np.arange(lhs, n))<EOL><DEDENT>elif lhs == -<NUM_LIT:1>:<EOL><INDENT>value = self[i]<EOL>if self.closed == target.closed:<EOL><INDENT>if target_value.left < value.left:<EOL><INDENT>indexer.append(np.array([-<NUM_LIT:1>]))<EOL>continue<EOL><DEDENT><DEDENT>elif self.closed == '<STR_LIT:right>':<EOL><INDENT>if target_value.left <= value.left:<EOL><INDENT>indexer.append(np.array([-<NUM_LIT:1>]))<EOL>continue<EOL><DEDENT><DEDENT>elif self.closed == '<STR_LIT:left>':<EOL><INDENT>if target_value.left <= value.left:<EOL><INDENT>indexer.append(np.array([-<NUM_LIT:1>]))<EOL>continue<EOL><DEDENT><DEDENT>indexer.append(np.arange(<NUM_LIT:0>, rhs + <NUM_LIT:1>))<EOL><DEDENT>else:<EOL><INDENT>indexer.append(np.arange(lhs, rhs + <NUM_LIT:1>))<EOL><DEDENT><DEDENT>return np.concatenate(indexer)<EOL>
Return an indexer for a target IntervalIndex with self