Return an instance of the ``_Term`` class given the term options.

def _get_term_object(filter_name,
                     term_name,
                     pillar_key='acl',
                     pillarenv=None,
                     saltenv=None,
                     merge_pillar=True,
                     **term_fields):
    '''
    Return an instance of the ``_Term`` class given the term options.
    '''
    log.debug('Generating config for term %s under filter %s', term_name, filter_name)
    term = _Term()
    term.name = term_name
    term_opts = {}
    if merge_pillar:
        term_opts = get_term_pillar(filter_name,
                                    term_name,
                                    pillar_key=pillar_key,
                                    saltenv=saltenv,
                                    pillarenv=pillarenv)
        log.debug('Merging with pillar data:')
        log.debug(term_opts)
        term_opts = _clean_term_opts(term_opts)
        log.debug('Cleaning up pillar data:')
        log.debug(term_opts)
    log.debug('Received processing opts:')
    log.debug(term_fields)
    log.debug('Cleaning up processing opts:')
    term_fields = _clean_term_opts(term_fields)
    log.debug(term_fields)
    log.debug('Final term opts:')
    term_opts.update(term_fields)
    log.debug(term_fields)
    for field, value in six.iteritems(term_opts):
        # setting the field attributes to the term instance of _Term
        setattr(term, field, value)
    log.debug('Term config:')
    log.debug(six.text_type(term))
    return term