code: def resolved_option(options, target, key):
      
      option_value = options.get(key)
      if not isinstance(target, AppBase) or options.is_flagged(key):
        return option_value
      v = target.payload.get_field_value(key, None)
      return option_value if v is None else v
docs: Get value for option "key".
  
      Resolution precedence is CLI option > target option > pants.ini option.
  
      :param options: Options returned by `task.get_option()`
      :param target: Target
      :param key: Key to get using the resolution precedence