def get_hosting_devices_qry(self, context, hosting_device_ids,<EOL>load_agent=True):
query = context.session.query(hd_models.HostingDevice)<EOL>if load_agent:<EOL><INDENT>query = query.options(joinedload('<STR_LIT>'))<EOL><DEDENT>if len(hosting_device_ids) > <NUM_LIT:1>:<EOL><INDENT>query = query.filter(hd_models.HostingDevice.id.in_(<EOL>hosting_device_ids))<EOL><DEDENT>else:<EOL><INDENT>query = query.filter(hd_models.HostingDevice.id ==<EOL>hosting_device_ids[<NUM_LIT:0>])<EOL><DEDENT>return query<EOL>
Returns hosting devices with <hosting_device_ids>.