def valid_api_version(version):
 global VALID_API_VERSIONS
 if (not isinstance(VALID_API_VERSIONS, list)):
  VALID_API_VERSIONS = [str(VALID_API_VERSIONS)]
 return (version in VALID_API_VERSIONS)

def valid_api_version ( version ) : global VALID_API_VERSIONS if ( not isinstance ( VALID_API_VERSIONS , list ) ) : VALID_API_VERSIONS = [ str ( VALID_API_VERSIONS ) ] return ( version in VALID_API_VERSIONS )
checks if the requested version is valid .