code: def bad_syntax(cls, syntax, resource_name, ex=None):
          
  
          if ex:
              msg = "The syntax is '%s' (%s)." % (syntax, ex)
          else:
              msg = "The syntax is '%s'." % syntax
  
          msg = "Could not parse '%s'. %s" % (resource_name, msg)
  
          return cls(msg)
docs: Exception used when the resource name cannot be parsed.