def METHOD_NAME(parameter, bank, template_ids):
    """ Get a specific value from a hdf file object in standard PyCBC
    template bank format
    Parameters
    ----------
    parameter: str
        the parameter to convert to, must be in conversion_options
    bank: h5py File object or dictionary of arrays
        Template bank containing the parameters for use in conversions
        must contain mass1, mass2, spin1z, spin2z as a minimum
    template_ids: numpy array
        Array of template IDs for reading a set of templates from the bank
    Returns
    -------
    values: numpy array, same size as template_ids
        Array of whatever the requested parameter is calculated for
        the specified templates in the bank
    """
    # These just give things already in the bank
    if parameter in bank:
        values = bank[parameter][:][template_ids]
    # Duration may be in the bank, but if not, we need to calculate
    elif parameter.endswith('duration'):
        fullband_req = False
        prem_required = False
        if parameter != "premerger_duration" and 'template_duration' in bank:
            # This statement should be the reached only if 'duration'
            # is given, but 'template_duration' is in the bank
            values = bank['template_duration'][:][template_ids]
        elif parameter in ['template_duration', 'duration']:
            # Only calculate fullband/premerger durations if we need to
            fullband_req = True
            if 'f_final' in bank:
                prem_required = True
        elif parameter == "premerger_duration":
            prem_required = True
        # Set up the arguments for get_imr_duration
        imr_args = ['mass1', 'mass2', 'spin1z', 'spin2z']
        if 'approximant' in bank:
            kwargs = {'approximant': bank['approximant'][:][template_ids]}
        else:
            kwargs = {}
        if fullband_req:
            # Unpack the appropriate arguments
            fullband_dur = pnutils.get_imr_duration(
                *[bank[k][:][template_ids]
                  for k in imr_args + ['f_lower']],
                **kwargs)
        if prem_required and 'f_final' in bank:
            # If f_final is in the bank, then we need to calculate
            # the premerger time of the end of the template
            prem_dur = pnutils.get_imr_duration(
                *[bank[k][:][template_ids]
                  for k in imr_args + ['f_final']],
                **kwargs)
        elif prem_required:
            # Pre-merger for bank without f_final is zero
            prem_dur = np.zeros_like(template_ids)
        # Now we decide what to return:
        if parameter in ['template_duration', 'duration']:
            values = fullband_dur
            if prem_required:
                values -= prem_dur
        else:
            values = prem_dur
    # Basic conversions
    elif parameter in mass_conversions.keys():
        values = mass_conversions[parameter](bank['mass1'][:][template_ids],
                                             bank['mass2'][:][template_ids])
    elif parameter in spin_conversions.keys():
        values = spin_conversions[parameter](bank['mass1'][:][template_ids],
                                             bank['mass2'][:][template_ids],
                                             bank['spin1z'][:][template_ids],
                                             bank['spin2z'][:][template_ids])
    else:
        # parameter not in the current conversion parameter list
        raise NotImplementedError("Bank conversion function " + parameter
                                  + " not recognised: choose from '" +
                                  "', '".join(conversion_options) + "'.")
    return values