def METHOD_NAME(spec):
  """Check for common Python keywords in spec.
  This function discourages the use of complex constructs
  in TensorFlow specs; it doesn't completely prohibit them
  (if necessary, we could check the AST).
  Args:
      spec: spec string
  Raises:
      ValueError: raised if spec contains a prohibited keyword.
  """
  spec = re.sub(QUOTED, "", spec)
  match = re.search(KEYWORDS, spec)
  if match:
    raise ValueError("keyword '%s' found in spec" % match.group(1))