def METHOD_NAME(specification, binput, pins):
    if binput:
        return pins.set([key for key in specification._internal_obj.map_input_pin_spec])
    else:
        return pins.set([key for key in specification._internal_obj.map_output_pin_spec])