code: def test_contexts(self, text, window_width, pad_context):
      obs = list(
          extract.keyword_in_context(
              text,
              "you",
              window_width=window_width,
              pad_context=pad_context,
          )
      )
      if pad_context is False:
          assert all(
              len(pre_ctx) <= window_width
              and len(post_ctx) <= window_width
              for pre_ctx, _, post_ctx in obs
          )
      else:
          assert all(
              len(pre_ctx) == window_width
              and len(post_ctx) == window_width
              for pre_ctx, _, post_ctx in obs
          )
  
file_path: textacy/tests/extract/test_kwic.py
imports: import re
  import pytest
  import textacy
  from textacy import extract
label_desc: Use image node_id 3 for calling the TestKeywordInContext obj's underlying member method code with example usage: obj.test_contexts(text, window_width, pad_context) without return types