def squeeze_list(src_list: Optional[List]) -> Union[List, Any]:
    """Return the first item of the given list if the list only contains one item.

    usually used in args parsing
    """
    if src_list is not None and len(src_list) == 1:
        return src_list[0]
    else:
        return src_list
Return the first item of the given list if the list only contains one item.

    usually used in args parsing
    
tridet/modeling/backbone/omni_scripts/utils.py