def _un_batch(item):
    """
    Given an arbitrary input, if it is a list with exactly one item then return that first item
    """
    if isinstance(item, list) and len(item) == 1:
        item = item[0]
    return item