def is_jid(jid):
 if (not isinstance(jid, six.string_types)):
  return False
 if (len(jid) != 20):
  return False
 try:
  int(jid)
  return True
 except ValueError:
  return False

def is_jid ( jid ) : if ( not isinstance ( jid , six . string_types ) ) : return False if ( len ( jid ) != 20 ) : return False try : int ( jid ) return True except ValueError : return False
returns true if the passed in value is a job id .