def DataFixture(data):
  # Transform keys to remove invalid characters, like ` `.
  assert all([all([c.isalnum() or c=='_' for c in key]) for key in data.keys()]), "All dictionary keys must be valid python variable names"
  DataPseudoClass = collections.namedtuple('DataPseudoClass', data.keys())
  return DataPseudoClass(**data)
Performs crowding replacement as a form of niching.
dataset/ETHPy150Open scottrice/Ice/tests/testinfra/fixtures.py/DataFixture--crossover with--dataset/ETHPy150Open aarongarrett/inspyred/inspyred/ec/replacers.py/crowding_replacement