def sorted_if_possible(iterable, **kwargs):
    """Create a sorted list of elements of an iterable if they are orderable.

    See `sorted` for details on optional arguments to customize the sorting.

    Args:
        Iterable of a finite number of elements to sort.
    kwargs:
        Keyword arguments are passed on to `sorted`.

    Returns:
        List of elements in `iterable`, sorted if orderable, otherwise kept in
        the order of iteration.

    """
    try:
        return sorted(iterable, **kwargs)
    except TypeError:
        return list(iterable)