original_docstring: 
          Create and return a new PlateIndex instance indexed by barcode.
          
          Returns:
              `PlateIndex`: a new PlateIndex instance with all plates indexed by 
                 barcode
          Raises: 
              `PlateIndexError`: if any of the plates lacks a barcode
              `PlateIndexError`: if any two plates have the same barcode
          
docstring: Create and return a new PlateIndex instance indexed by barcode.
docstring_tokens: Create and return a new PlateIndex instance indexed by barcode .
code: def indexByBarcode(self):
          """
          Create and return a new PlateIndex instance indexed by barcode.
          
          Returns:
              `PlateIndex`: a new PlateIndex instance with all plates indexed by 
                 barcode
          Raises: 
              `PlateIndexError`: if any of the plates lacks a barcode
              `PlateIndexError`: if any two plates have the same barcode
          """
          r = PlateIndex()
          for plate in self.values():
              key = plate.barcode
              if not key:
                  raise PlateIndexError('plate %r has no barcode' % plate)
              if key in r:
                  raise PlateIndexError('duplicate barcode %s' % key)
              r[key] = plate
          return r
code_tokens: def indexByBarcode ( self ) : r = PlateIndex ( ) for plate in self . values ( ) : key = plate . barcode if not key : raise PlateIndexError ( 'plate %r has no barcode' % plate ) if key in r : raise PlateIndexError ( 'duplicate barcode %s' % key ) r [ key ] = plate return r
short_docstring: Create and return a new PlateIndex instance indexed by barcode.
short_docstring_tokens: Create and return a new PlateIndex instance indexed by barcode .
comment: """
          Create and return a new PlateIndex instance indexed by barcode.
          
          Returns:
              `PlateIndex`: a new PlateIndex instance with all plates indexed by 
                 barcode
          Raises: 
              `PlateIndexError`: if any of the plates lacks a barcode
              `PlateIndexError`: if any two plates have the same barcode
          """