code: def ok_kwarg(val):
          
  
          import keyword
  
          try:
              return str.isidentifier(val) and not keyword.iskeyword(val)
          except TypeError:
              # Non-string values are never a valid keyword arg
              return False
docs: Helper method for screening keyword arguments