original_docstring: 
      Parses and validates a value for the given task property, and returns its
      parsed form if it is valid.
      
docstring: Parses and validates a value for the given task property, and returns its
  parsed form if it is valid.
docstring_tokens: Parses and validates a value for the given task property and returns its parsed form if it is valid .
code: def parse_task_property(
      prop: str, value: str, logger: utils.Logger, position: utils.FilePosition
  ) -> Optional[Any]:
      """
      Parses and validates a value for the given task property, and returns its
      parsed form if it is valid.
      """
      if prop == "task":
          try:
              return utils.parse_task_id(value)
          except ValueError as err:
              logger.warn(position, "{}", err.args[0])
              return None
  
      elif prop == "label":
          if not value:
              logger.warn(position, "Task label cannot be empty")
              return None
  
          return value
  
      elif prop == "status":
          value = value.upper()
          if value not in ("DONE", "IN-PROGRESS", "BLOCKED", "TODO"):
              logger.warn(position, "Invalid status value '{}'", value)
              return None
  
          return utils.TaskStatus[value.replace("-", "_")]
  
      elif prop == "priority":
          try:
              if value.lower() == "none":
                  return utils.NOT_PROVIDED
  
              priority = int(value)
              if priority not in range(1, 6):
                  logger.warn(
                      position, "Priority value '{}' not in range 1..5", priority
                  )
                  return None
  
              return priority
          except ValueError:
              logger.warn(position, "Priority value '{}' must be an integer", value)
              return None
  
      elif prop == "deadline":
          try:
              if value.lower() == "none":
                  return utils.NOT_PROVIDED
  
              return datetime.date.fromisoformat(value)
          except ValueError:
              logger.warn(position, "Deadline value '{}' not in format YYYY-MM-DD", value)
              return None
  
      elif prop == "depends":
          tasks = value.split()
          if not tasks:
              logger.warn(
                  position,
                  "Depends list should be left out if there are no dependent tasks",
              )
              return None
  
          task_ids = []
          for task in tasks:
              try:
                  task_ids.append(utils.parse_task_id(task))
              except ValueError as err:
                  logger.warn(position, "Issue with task ID {}: {}", task, err.args[0])
                  return None
  
          return set(task_ids)
  
      else:
          logger.warn(position, "Invalid task property {}", prop)
          return None
code_tokens: def parse_task_property ( prop : str , value : str , logger : utils . Logger , position : utils . FilePosition ) -> Optional [ Any ] : if prop == "task" : try : return utils . parse_task_id ( value ) except ValueError as err : logger . warn ( position , "{}" , err . args [ 0 ] ) return None elif prop == "label" : if not value : logger . warn ( position , "Task label cannot be empty" ) return None return value elif prop == "status" : value = value . upper ( ) if value not in ( "DONE" , "IN-PROGRESS" , "BLOCKED" , "TODO" ) : logger . warn ( position , "Invalid status value '{}'" , value ) return None return utils . TaskStatus [ value . replace ( "-" , "_" ) ] elif prop == "priority" : try : if value . lower ( ) == "none" : return utils . NOT_PROVIDED priority = int ( value ) if priority not in range ( 1 , 6 ) : logger . warn ( position , "Priority value '{}' not in range 1..5" , priority ) return None return priority except ValueError : logger . warn ( position , "Priority value '{}' must be an integer" , value ) return None elif prop == "deadline" : try : if value . lower ( ) == "none" : return utils . NOT_PROVIDED return datetime . date . fromisoformat ( value ) except ValueError : logger . warn ( position , "Deadline value '{}' not in format YYYY-MM-DD" , value ) return None elif prop == "depends" : tasks = value . split ( ) if not tasks : logger . warn ( position , "Depends list should be left out if there are no dependent tasks" , ) return None task_ids = [ ] for task in tasks : try : task_ids . append ( utils . parse_task_id ( task ) ) except ValueError as err : logger . warn ( position , "Issue with task ID {}: {}" , task , err . args [ 0 ] ) return None return set ( task_ids ) else : logger . warn ( position , "Invalid task property {}" , prop ) return None
short_docstring: Parses and validates a value for the given task property, and returns its
  parsed form if it is valid.
short_docstring_tokens: Parses and validates a value for the given task property and returns its parsed form if it is valid .
comment: """
      Parses and validates a value for the given task property, and returns its
      parsed form if it is valid.
      """