code: def _scrub_links(links, name):
      '''
      Remove container name from HostConfig:Links values to enable comparing
      container configurations correctly.
      '''
      if isinstance(links, list):
          ret = []
          for l in links:
              ret.append(l.replace('/{0}/'.format(name), '/', 1))
      else:
          ret = links
  
      return ref _scrub_links(links, name):
      '''
      Remove container name from HostConfig:Links values to enable comparing
      container configurations correctly.
      '''
      if isinstance(links, list):
          ret = []
          for l in links:
              ret.append(l.replace('/{0}/'.format(name), '/', 1))
      else:
          ret = links
  
      return ret
docs: Remove container name from HostConfig:Links values to enable comparing
      container configurations correctly.