<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_wanted_channels(wanted_sig_names, record_sig_names, pad=False):
 """ Given some wanted signal names, and the signal names contained in a record, return the indices of the record channels that intersect. Parameters wanted_sig_names : list List of desired signal name strings record_sig_names : list List of signal names for a single record pad : bool, optional Whether the output channels is to always have the same number of elements and the wanted channels. If True, pads missing signals with None. Returns ------- wanted_channel_inds """

    if pad:
        return [record_sig_names.index(s) if s in record_sig_names else None for s in wanted_sig_names]
    else:
        return [record_sig_names.index(s) for s in wanted_sig_names if s in record_sig_names]