def METHOD_NAME(logical_shape, physical_shape):
    # get the number of dimensions
    logical_num_dims = len(logical_shape)
    physical_num_dims = len(physical_shape)
    assert logical_num_dims >= physical_num_dims, \
        'The number of dimensions in the logical shape is smaller than that of the physical shape, this tensor is not broadcast!'
    # track the dim and its broadcasting type
    logical_dim_broadcast_info = {}
    for i in range(logical_num_dims):
        # get the trailing dim size
        logical_dim_idx = logical_num_dims - i - 1
        physical_dim_idx = physical_num_dims - i - 1
        logical_dim_size = logical_shape[logical_dim_idx]
        if physical_dim_idx >= 0:
            physical_dim_size = physical_shape[physical_dim_idx]
            if physical_dim_size == logical_dim_size:
                logical_dim_broadcast_info[logical_dim_idx] = BroadcastType.EQUAL
            elif physical_dim_size == 1 and physical_dim_size != logical_dim_size:
                logical_dim_broadcast_info[logical_dim_idx] = BroadcastType.MULTIPLE
        else:
            logical_dim_broadcast_info[logical_dim_idx] = BroadcastType.PADDING
    return logical_dim_broadcast_info