code: def get_in_samples(samples, fn):
      
      for sample in samples:
          sample = to_single_data(sample)
          if fn(sample, None):
              return fn(sample)
      return None
docs: for a list of samples, return the value of a global option