<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_format_selected(image_format, formats, progs):
 """Determine if the image format is selected by command line arguments."""

    intersection = formats & Settings.formats
    mode = _is_program_selected(progs)
    result = (image_format in intersection) and mode
    return result