def convert_dim_nums() -> str:
    (lhs_spec, rhs_spec, out_spec) = dimension_numbers
    supported_rhs_shape = ([(nb_spatial_dimensions + 1), nb_spatial_dimensions] + list(range(nb_spatial_dimensions)))
    if (list(rhs_spec) != supported_rhs_shape):
        raise error('Input filter (RHS) shape format not supported in TensorFlow.')
    if (lhs_spec != out_spec):
        raise error('TensorFlow requires the same data format for LHS and output.')
    spatial_dim_alphabet = 'DHW'[(- nb_spatial_dimensions):]
    if (list(lhs_spec) == ([0, (len(lhs_spec) - 1)] + list(range(1, (len(lhs_spec) - 1))))):
        return (('N' + spatial_dim_alphabet) + 'C')
    raise error('Data format is unsupported by TensorFlow.')
def convert_dim_nums() -> str:
    (lhs_spec, rhs_spec, out_spec) = dimension_numbers
    supported_rhs_shape = ([(nb_spatial_dimensions + 1), nb_spatial_dimensions] + list(range(nb_spatial_dimensions)))
    if (list(rhs_spec) != supported_rhs_shape):
        raise error('Input filter (RHS) shape format not supported in TensorFlow.')
    if (lhs_spec != out_spec):
        raise error('TensorFlow requires the same data format for LHS and output.')
    spatial_dim_alphabet = 'DHW'[(- nb_spatial_dimensions):]
    if (list(lhs_spec) == ([0, (len(lhs_spec) - 1)] + list(range(1, (len(lhs_spec) - 1))))):
        return (('N' + spatial_dim_alphabet) + 'C')
    raise error('Data format is unsupported by TensorFlow.')