def create_namespace_entry(self, namespace, size, number, timestamp):
    entities_to_write = []
    namespace_stat = stats.NamespaceStat(subject_namespace=namespace,
                               bytes=size,
                               count=number,
                               timestamp=timestamp)
    entities_to_write.append(namespace_stat)

    # All application are assumed to have the default namespace.
    if namespace != "":
      namespace_entry = metadata.Namespace(key_name=namespace)
      entities_to_write.append(namespace_entry)
    try:
      db.put(entities_to_write)
    except datastore_errors.InternalError, internal_error:
      logging.error("Error inserting namespace info: {0}.".\
        format(internal_error))
      return False
    logging.debug("Done creating namespace stats")
    return True
Overwrite L3Scheduler's method to filter by availability zone.
dataset/ETHPy150Open AppScale/appscale/AppDB/groomer.py/DatastoreGroomer.create_namespace_entry--crossover with--dataset/ETHPy150Open openstack/neutron/neutron/scheduler/l3_agent_scheduler.py/AZLeastRoutersScheduler.get_ha_routers_l3_agents_counts