code: def reverse_complement(sequence, complement_dict=None):
      """Returns the reverse complement of a DNA sequence.
  
      By default this will successfully reverse complement sequences comprised
      solely of A, C, G, and T letters. Other complement dictionaries can be
      passed in for more permissive matching.
  
      Args:
        sequence: str. The input sequence to reverse complement.
        complement_dict: dict[str, str]. The lookup dictionary holding the
          complement base pairs.
  
      Returns:
        The reverse complement DNA sequence.
  
      Raises:
        Error: The sequence contains letters not present in complement_dict.
      """
      if complement_dict is None:
          complement_dict = STRICT_DNA_COMPLEMENT_UPPER
  
      try:
          return "".join(
              complement_dict[nt] for nt in reversed(sequence)
          )
      except KeyError:
          raise Error(
              "Unknown base in {}, cannot reverse complement using {}".format(
                  sequence, str(complement_dict)
              )
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
label_desc: Use image node_id 2 for calling a global function with example usage: reverse_complement(sequence, complement_dict) and returns: str