parameters: (value, preferred)
return_statement: return value.dtype
docstring: Helper for _find_dtype.
docstring_summary: Helper for _find_dtype.
docstring_tokens: Helper for _find_dtype .
function: def _find_dtype_helper(value, preferred):
    """Helper for _find_dtype."""
    if preferred is not None:
      return preferred
    elif isinstance(value, RowPartition):
      return value.dtype
    elif isinstance(value, dtypes.DType):
      return value
    elif isinstance(value, int):
      return None
    elif isinstance(value, list):
      return None
    elif isinstance(value, tuple):
      return None
    elif isinstance(value, core.Tensor):
      return value.dtype
    return value.dtype
function_tokens: def _find_dtype_helper ( value , preferred ) : if preferred is not None : return preferred elif isinstance ( value , RowPartition ) : return value . dtype elif isinstance ( value , dtypes . DType ) : return value elif isinstance ( value , int ) : return None elif isinstance ( value , list ) : return None elif isinstance ( value , tuple ) : return None elif isinstance ( value , core . Tensor ) : return value . dtype return value . dtype