parameters: (expected_rank, actual_tensor)
docstring: Returns whether actual_tensor's rank is expected_rank.
  
    Args:
      expected_rank: Integer defining the expected rank, or tensor of same.
      actual_tensor: Tensor to test.
    Returns:
      New tensor.
docstring_summary: Returns whether actual_tensor's rank is expected_rank.
docstring_tokens: Returns whether actual_tensor s rank is expected_rank .
function: def _is_rank(expected_rank, actual_tensor):
    """Returns whether actual_tensor's rank is expected_rank.
  
    Args:
      expected_rank: Integer defining the expected rank, or tensor of same.
      actual_tensor: Tensor to test.
    Returns:
      New tensor.
    """
    with ops.op_scope([actual_tensor], 'is_rank') as scope:
      expected = ops.convert_to_tensor(expected_rank, name='expected')
      actual = array_ops.rank(actual_tensor, name='actual')
      return math_ops.equal(expected, actual, name=scope)
function_tokens: def _is_rank ( expected_rank , actual_tensor ) : with ops . op_scope ( [ actual_tensor ] , 'is_rank' ) as scope : expected = ops . convert_to_tensor ( expected_rank , name = 'expected' ) actual = array_ops . rank ( actual_tensor , name = 'actual' ) return math_ops . equal ( expected , actual , name = scope )