def METHOD_NAME(definition: dict[str, Any], start_line: int, end_line: int, tag: str) -> str:
    """
    extract the value of the tag, that is within the line of range(start_line, end_line)
    >>> Runner.resolve_sub_name({"executors":{"image-executor":{"docker":[],"__startline__":8,"__endline__":11}}}, 9, 11, 'executors')
    'image-executor'
    >>> Runner.resolve_sub_name({"jobs":{"job-name":{"docker":[],"__startline__":13,"__endline__":20}}}, 15, 16, 'jobs')
    'job-name'
    """
    if not definition:
        return ""
    tag_value = definition.get(tag) or {}
    for key, sub_name in tag_value.items():
        if key in (START_LINE, END_LINE) or not isinstance(sub_name, dict):
            continue
        if sub_name[START_LINE] <= start_line <= end_line <= sub_name[END_LINE]:
            return str(key)
    return ""