parameters: (value_destination_pairs)
return_statement: return True
docstring: Validates value_destination_pairs are valid.
docstring_summary: Validates value_destination_pairs are valid.
docstring_tokens: Validates value_destination_pairs are valid .
function: def _validate_value_destination_pairs(value_destination_pairs):
    """Validates value_destination_pairs are valid."""
    # TODO(yuefengz): raise exceptions instead of returning False.
    if not value_destination_pairs: return False
    if not isinstance(value_destination_pairs, (list, tuple)): return False
    if not all(isinstance(pair, tuple) for pair in value_destination_pairs):
      return False
    if not all(isinstance(v[0], value_lib.PerReplica)
               for v in value_destination_pairs):
      return False
    return True
function_tokens: def _validate_value_destination_pairs ( value_destination_pairs ) : # TODO(yuefengz): raise exceptions instead of returning False. if not value_destination_pairs : return False if not isinstance ( value_destination_pairs , ( list , tuple ) ) : return False if not all ( isinstance ( pair , tuple ) for pair in value_destination_pairs ) : return False if not all ( isinstance ( v [ 0 ] , value_lib . PerReplica ) for v in value_destination_pairs ) : return False return True