def check_federated_type_with_correct_placement(value_type, placement):
  """Checks that a `tff.Type` has the desired federated placement."""
  if value_type is None:
    return False
  elif value_type.is_federated() and value_type.placement == placement:
    return True
  return False