def _get_friends_names(name, all_names, relationship_matrix):
  """Get the names of the friends of a player.

  Args:
    name: name of the player
    all_names: names of all the players
    relationship_matrix: relationship matrix of the players

  Returns:
    names of the friends of the player from the relationship matrix or if it 
      is None, then all the names that are not the player itself
  """
  if (
      relationship_matrix
      and name in relationship_matrix
  ):
    direct_friends = []
    for friend_name in relationship_matrix[name]:
      if (
          relationship_matrix[name][friend_name] == 1.0
          and friend_name != name
      ):
        direct_friends.append(friend_name)
    return ', '.join(direct_friends)
  else:
    return ', '.join([x for x in all_names if x != name])
Get the names of the friends of a player.

  Args:
    name: name of the player
    all_names: names of all the players
    relationship_matrix: relationship matrix of the players

  Returns:
    names of the friends of the player from the relationship matrix or if it 
      is None, then all the names that are not the player itself
  
examples/deprecated/modular/environment/pub_coordination.py