@classmethod
  def GetFilter(cls, filter_name):
    # Check if the filter is defined in the registry.
    try:
      filt_cls = cls.GetPlugin(filter_name)
    except KeyError:
      raise DefinitionError("Filter %s does not exist." % filter_name)
    # Return an initialized filter, after initializing it in cls.filters if it
    # doesn't exist.
    return cls.filters.setdefault(filter_name, filt_cls())
Retrieve an IPAM subnet.
dataset/ETHPy150Open google/grr/grr/lib/checks/filters.py/Filter.GetFilter--crossover with--dataset/ETHPy150Open openstack/neutron/neutron/ipam/drivers/neutrondb_ipam/driver.py/NeutronDbPool.get_subnet