def get_kwargs_from_breaks(self, breaks, closed='<STR_LIT:right>'):
if len(breaks) == <NUM_LIT:0>:<EOL><INDENT>return {'<STR_LIT:data>': breaks}<EOL><DEDENT>ivs = [Interval(l, r, closed) if notna(l) else l<EOL>for l, r in zip(breaks[:-<NUM_LIT:1>], breaks[<NUM_LIT:1>:])]<EOL>if isinstance(breaks, list):<EOL><INDENT>return {'<STR_LIT:data>': ivs}<EOL><DEDENT>elif is_categorical_dtype(breaks):<EOL><INDENT>return {'<STR_LIT:data>': breaks._constructor(ivs)}<EOL><DEDENT>return {'<STR_LIT:data>': np.array(ivs, dtype=object)}<EOL>
converts intervals in breaks format to a dictionary of kwargs to
specific to the format expected by the IntervalIndex/Index constructors