def obfuscate_subquery(obfuscator, obfuscation, subquery):
    """ Takes subquery to obfuscate by encoding.
        :obfuscator:    Obfuscator object.
        :obfuscation:   Type of obfuscation to use. Ex, hex-encoding.
        :subquery:      String. Part of query to encode.
        :returns:       String. Encoded subquery.
    """
    
    return obfuscator.by_encoding(subquery, obfuscation)