<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def defaulted_property(self, target, option_name):
 """Computes a language property setting for the given JvmTarget. :param selector A function that takes a target or platform and returns the boolean value of the property for that target or platform, or None if that target or platform does not directly define the property. If the target does not override the language property, returns true iff the property is true for any of the matched languages for the target. """

    if target.has_sources('.java'):
      matching_subsystem = Java.global_instance()
    elif target.has_sources('.scala'):
      matching_subsystem = ScalaPlatform.global_instance()
    else:
      return getattr(target, option_name)

    return matching_subsystem.get_scalar_mirrored_target_option(option_name, target)