code: def is_uid(uid):
      
      if not isinstance(uid, basestring):
          return False
      if uid != "0" and len(uid) != 32:
          return False
      return True
docs: Checks if the passed in uid is a valid UID
  
      :param uid: The uid to check
      :type uid: string
      :return: True if the uid is a valid 32 alphanumeric uid or '0'
      :rtype: bool