def expand_variant(self, variant_call):
    # Only expand SNPs.  Leave indels as-is.
    if not self.is_snp(variant_call):
      return variant_call

    expansion_calls = []
    for sample_id in self.sample_refs.keys():
      ref_call = self.sample_refs[sample_id]
      # This criteria is correct for SNPs.  It would need to be modified
      # if we wish to support insertions or deletions
      if (self.get_start(variant_call) <= self.get_start(ref_call) and
          self.get_end(ref_call) >= self.get_start(variant_call) + 1):
        expansion_calls.extend(ref_call['call'])
      else:
        # This ref_block is now outside of the range we are
        # considering and therefore obsolete, nuke it
        del self.sample_refs[sample_id]

    if self.filter_ref_matches:
      # Get the sample_ids already called in this variant
      variant_sample_names = [call['call_set_name'] for call in
                              variant_call['call']]

      # Filter out ref_calls for samples called in this variant; this
      # is naive; a better approach might be to compare the quality
      # score of the referenece call to that of the variant call for
      # the sample in question
      variant_call['call'].extend(
          [call for call in expansion_calls
           if call['call_set_name'] not in variant_sample_names]
          )
    else:
      variant_call['call'].extend(expansion_calls)

    return variant_call
dataset/ETHPy150Open googlegenomics/codelabs/Python/PlatinumGenomes-variant-transformation/gvcf_expander.py/GvcfExpander.expand_variant/swapped operands of `<=`