def equals(self, other):
if self.is_(other):<EOL><INDENT>return True<EOL><DEDENT>if not isinstance(other, IntervalIndex):<EOL><INDENT>if not is_interval_dtype(other):<EOL><INDENT>return False<EOL><DEDENT>other = Index(getattr(other, '<STR_LIT>', other))<EOL><DEDENT>return (self.left.equals(other.left) and<EOL>self.right.equals(other.right) and<EOL>self.closed == other.closed)<EOL>
Determines if two IntervalIndex objects contain the same elements