clear()
clear() clears the text if it's a text entry element and is defined as:
def clear(self):
"""Clears the text if it's a text entry element."""
self._execute(Command.CLEAR_ELEMENT)
As clear() doesn't returns anything hence as per your line of code:
elem = driver.find_element_by_id("udp-session-quota").clear()
elem is assigned as null i.e. NoneType. Moving forward when you try to invoke send_keys() on elem:
elem.send_keys(MY_UDP_SESSION)
You see the error.
Solution
Once the WebElement is returned then you can invoke clear() and send_keys() as follows:
MY_UDP_SESSION = "32768"
elem = driver.find_element_by_id("udp-session-quota")
elem.clear()
elem.send_keys(MY_UDP_SESSION)