Retrieve the nearest parent setter function for an OID

def get_setter(self, oid):
		"""
		Retrieve the nearest parent setter function for an OID
		"""
		if hasattr(self.setter, oid):
			return self.setter[oid]
		parents = [ poid for poid in list(self.setter.keys()) if oid.startswith(poid) ]
		if parents:
			return self.setter[max(parents)]
		return self.default_setter