def _is_variable(x):
    return (isinstance(x, variables.Variable) or resource_variable_ops.is_resource_variable(x))
def _is_variable(x):
    return (isinstance(x, variables.Variable) or resource_variable_ops.is_resource_variable(x))