def get_shapes(dict_arr):
    """
    get `shape` attribute of values of dict if they are None and have length

    Args:
        dict_arr (dict): dict of arrays

    Returns:
        dict: keys of `dict_array` with lengths

    """
    return {key: value.shape for key, value in dict_arr.items() if (value is not None and len(value))}