code: def assert_key_type_value(self,
                                context_item,
                                caller,
                                extra_error_text=''):
          
          assert context_item, ("context_item parameter must be specified.")
  
          if extra_error_text is None or extra_error_text == '':
              append_error_text = ''
          else:
              append_error_text = f' {extra_error_text}'
  
          if not context_item.key_in_context:
              raise KeyNotInContextError(f'{caller} couldn\'t find '
                                         f'{context_item.key} in context.'
                                         f'{append_error_text}')
  
          if not context_item.has_value:
              raise KeyInContextHasNoValueError(
                  f'{caller} found {context_item.key} in '
                  f'context but it doesn\'t have a value.'
                  f'{append_error_text}')
  
          if not context_item.is_expected_type:
              raise KeyInContextHasNoValueError(
                  f'{caller} found {context_item.key} in context, but it\'s '
                  f'not a {context_item.expected_type}.'
                  f'{append_error_text}')
docs: Assert that keys exist of right type and has a value.
  
          Args:
               context_item: ContextItemInfo tuple
               caller: string. calling function name - this used to construct
                       error messages
               extra_error_text: append to end of error message.
  
          Raises:
              AssertionError: if context_item None.
              KeyNotInContextError: Key doesn't exist
              KeyInContextHasNoValueError: context[key] is None or the wrong
                                           type.