def _convert_listlike(arg, unit='<STR_LIT>', box=True, errors='<STR_LIT>', name=None):
if isinstance(arg, (list, tuple)) or not hasattr(arg, '<STR_LIT>'):<EOL><INDENT>arg = np.array(list(arg), dtype=object)<EOL><DEDENT>try:<EOL><INDENT>value = sequence_to_td64ns(arg, unit=unit,<EOL>errors=errors, copy=False)[<NUM_LIT:0>]<EOL><DEDENT>except ValueError:<EOL><INDENT>if errors == '<STR_LIT:ignore>':<EOL><INDENT>return arg<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>if box:<EOL><INDENT>from pandas import TimedeltaIndex<EOL>value = TimedeltaIndex(value, unit='<STR_LIT>', name=name)<EOL><DEDENT>return value<EOL>
Convert a list of objects to a timedelta index object.