def unwrap_xarray_item(item):
    """
    Unwraps something that might or might not be an xarray like with .item()
    attribute.

    This is especially helpful for dealing with unwrapping coordinates which might
    be floating point-like or might be array-like.

    :param item:
    :return:
    """
    try:
        return item.item()
    except (AttributeError, ValueError):
        return item
