code: def get_cassandra_connection(alias=None, name=None):
      
  
      for _alias, connection in get_cassandra_connections():
          if alias is not None:
              if alias == _alias:
                  return connection
          elif name is not None:
              if name == connection.settings_dict['NAME']:
                  return connection
          else:
              return connection
docs: :return: cassandra connection matching alias or name or just first found.