You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: labware.rb
    path of file: ./repos/sequencescape/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# Labware represents a physical object which moves around the lab.
# It has one or more receptacles.
# rubocop
    
    def find_from_any_barcode(source_barcode)
      if source_barcode.blank?
        nil
      elsif /\A[0-9]{1,7}\z/.match?(source_barcode)
        # Just a number
        joins(:barcodes).order(:id).find_by('barcodes.barcode LIKE "__?_"', source_barcode)
      else
        find_by_barcode(source_barcode)
      end