def METHOD_NAME(a: Tensor, b: Tensor) -> Optional[Dim]:
    """
    :param a:
    :param b:
    :return: feature dim if consistent or None
    """
    if a.feature_dim and not b.feature_dim:
        return a.feature_dim
    if b.feature_dim and not a.feature_dim:
        return b.feature_dim
    if a.feature_dim and b.feature_dim and a.feature_dim == b.feature_dim:
        return a.feature_dim
    return None