code: def test_find_mac_near_keyword(self):
      # key and value are on the same line
      data = """
  fake      Link encap:UNSPEC  hwaddr 00-00
  cscotun0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
  eth0      Link encap:Ethernet  HWaddr 12:34:56:78:90:ab
  """
  
      # The above data will only be parsed properly on non-AIX unixes.
      with mock.patch.multiple(
          self.uuid,
          _MAC_DELIM=b":",
          _MAC_OMITS_LEADING_ZEROES=False,
          _get_command_stdout=mock_get_command_stdout(data),
      ):
          mac = self.uuid._find_mac_near_keyword(
              command="ifconfig",
              args="",
              keywords=[b"hwaddr"],
              get_word_index=lambda x: x + 1,
          )
  
      self.assertEqual(mac, 0x1234567890AB)
  
imports: import unittest
  from test import support
  from test.support import import_helper
  import builtins
  import contextlib
  import copy
  import enum
  import io
  import os
  import pickle
  import sys
  import weakref
  from unittest import mock
label_desc: Use image node_id 6 for calling the BaseTestInternals obj's underlying member method code with example usage: obj.test_find_mac_near_keyword() without return types