code: def is_valid(edtf_candidate):
      
  
      if (
          isLevel0(edtf_candidate) or
          isLevel1(edtf_candidate) or
          isLevel2(edtf_candidate)
      ):
          if '/' in edtf_candidate:
              return is_valid_interval(edtf_candidate)
          else:
              return True
      else:
          return False
docs: isValid takes a candidate date and returns if it is valid or not