code: public static DBIDVar randomSample(DBIDs ids, Random random) {
      return DBIDUtil.ensureArray(ids).assignVar(random.nextInt(ids.size()), DBIDUtil.newVar());
    }
docs: Draw a single random sample.
  
  @param ids IDs to draw from
  @param random Random value
  @return Random ID