human
I wrote the below code

    from pandas.core.indexes.datetimes import DatetimeIndex
    tz = ('utc' if utc else None)
    def _convert_listlike(arg, box, format, name=None, tz=tz):
        if isinstance(arg, (list, tuple)):
            arg = np.array(arg, dtype='O')
        if is_datetime64tz_dtype(arg):
            if (not isinstance(arg, DatetimeIndex)):
                return DatetimeIndex(arg, tz=tz, name=name)
            if utc:
                arg = arg.tz_convert(None).tz_localize('UTC')
            return arg
        elif is_datetime64_ns_dtype(arg):
            if (box and (not isinstance(arg, DatetimeIndex))):
                try:
                    return DatetimeIndex(arg, tz=tz, name=name)
                except ValueError:
                    pass
            return arg
        elif (unit is not None):
            if (format is not None):
                raise ValueError('cannot    specify    both    format    and    unit')
            arg = getattr(arg, 'values', arg)
            result = tslib.array_with_unit_to_datetime(arg, unit, errors=errors)
            if box:
                if (errors == 'ignore'):
                    from pandas import Index
                    return Index(result)
                return DatetimeIndex(result, tz=tz, name=name)
            return result
        elif (getattr(arg, 'ndim', 1) > 1):
            raise TypeError('arg    must    be    a    string,    datetime,    list,    tuple,    1-d    array,    or    Series')
        arg = _ensure_object(arg)
        require_iso8601 = False
        if (infer_datetime_format and (format is None)):
            format = _guess_datetime_format_for_array(arg, dayfirst=dayfirst)
        if (format is not None):
            format_is_iso8601 = _format_is_iso(format)
            if format_is_iso8601:
                require_iso8601 = (not infer_datetime_format)
                format = None
        try:
            result = None
            if (format is not None):
                if (format == '%Y%m%d'):
                    try:
                    ...

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False, utc=None, box=True, format=None, exact=True, unit=None, infer_datetime_format=False, origin='unix'):