code: def file_or_token(value):
      
      if isfile(value):
          with open(value) as fd:
              return fd.read().strip()
  
      if any(char in value for char in '/\\.'):
          # This chars will never be in a token value, but may be in a path
          # The error message will be handled by the parser
          raise ValueError()
  
      return value
docs: If value is a file path and the file exists its contents are stripped and returned,
      otherwise value is returned.