code: def is_valid(hal_id):
      
      match = REGEX.match(hal_id)
      return (match is not None) and (match.group(0) == hal_id)
docs: Check that a given HAL id is a valid one.
  
      :param hal_id: The HAL id to be checked.
      :returns: Boolean indicating whether the HAL id is valid or not.
  
      >>> is_valid("hal-01258754, version 1")
      True
  
      >>> is_valid("hal-01258754")
      True
  
      >>> is_valid("hal-01258754v2")
      True
  
      >>> is_valid("foobar")
      False