docstr: Retrieves every well of a plate that has an image attached to it
  (via a wellsample of course).
  
      plate_id    - id of the plate
      limit               - maximum number of wells to retrieve
docstr_tok: ["Retrieves","every","well","of","a","plate","that","has","an","image","attached","to","it","(","via","a","wellsample","of","course",")",".","plate_id","-","id","of","the","plate","limit","-","maximum","number","of","wells","to","retrieve"]
code: def get_wells_from_plate(self, plate_id, limit=None):
      """Retrieves every well of a plate that has an image attached to it
      (via a wellsample of course).
  
          plate_id	- id of the plate
          limit		- maximum number of wells to retrieve
      """
      q = self.omero_session.getQueryService()
      p = omero.sys.Parameters()
      p.map = {}
      p.map["oid"] = rlong(int(plate_id))
      if limit is not None:
          f = omero.sys.Filter()
          f.limit = rint(int(limit))
          p.theFilter = f
      sql = (
          "select well from Well as well "
          "left outer join fetch well.plate as pt "
          "left outer join fetch well.wellSamples as ws "
          "inner join fetch ws.image as img "
          "where well.plate.id = :oid"
      )
      return q.findAllByQuery(sql, p)
  
imports: import traceback
  import numpy
  import wx
  import cellprofiler_core.image
  import cellprofiler_core.module
  import cellprofiler_core.measurement
  import cellprofiler_core.preferences
  import cellprofiler_core.setting
  from cellprofiler_core.modules import default_cpimage_name
  import omero
  from omero.rtypes import rlong
  from omero.rtypes import rint
  from omero_version import omero_version
label_desc: Use image node_id 12 for calling the OmeroLoadImages obj's underlying member method code with example usage: obj.get_wells_from_plate(plate_id, limit) and returns: q