docstr: Returns the number of time the tag is found in `mock_summary_scalar`.
  
  This is used because `assert_has_calls` uses a list for verification that
  is cumbersome and produces confusing error messages on unit test failure.
  Example: Index out of bounds if more values exist than expected. This is not
  intutive compared with counting the items in the list.
  To debug: `print('{}'.format(mock_scalar_summary.mock_calls))`.
  
  Args:
    mock_summary_scalar: Name of the summary tag.
    tag: Name of the summary tag to count.
  
  Returns:
    Number of times the tag was added via the `mock_summary_scalar`.
docstr_tok: ["Returns","the","number","of","time","the","tag","is","found","in","`","mock_summary_scalar","`",".","This","is","used","because","`","assert_has_calls","`","uses","a","list","for","verification","that","is","cumbersome","and","produces","confusing","error","messages","on","unit","test","failure",".","Example",":","Index","out","of","bounds","if","more","values","exist","than","expected",".","This","is","not","intutive","compared","with","counting","the","items","in","the","list",".","To","debug",":","`","print","(","'","{","}","'.format","(","mock_scalar_summary.mock_calls",")",")","`",".","Args",":","mock_summary_scalar",":","Name","of","the","summary","tag",".","tag",":","Name","of","the","summary","tag","to","count",".","Returns",":","Number","of","times","the","tag","was","added","via","the","`","mock_summary_scalar","`","."]
code: def count_summary_scalar_tags_in_call_list(
      self, mock_summary_scalar, tag
  ):
      """Returns the number of time the tag is found in `mock_summary_scalar`.
  
      This is used because `assert_has_calls` uses a list for verification that
      is cumbersome and produces confusing error messages on unit test failure.
      Example: Index out of bounds if more values exist than expected. This is not
      intutive compared with counting the items in the list.
      To debug: `print('{}'.format(mock_scalar_summary.mock_calls))`.
  
      Args:
        mock_summary_scalar: Name of the summary tag.
        tag: Name of the summary tag to count.
  
      Returns:
        Number of times the tag was added via the `mock_summary_scalar`.
      """
      # The `call` object is a tuple. [2] is a dictionary of the keyword args.
      return sum(
          1
          for c in mock_summary_scalar.mock_calls
          if c[2]["name"] == tag
      )
  
file_path: agents/tf_agents/experimental/distributed/examples/eval_job_test.py
imports: from absl.testing.absltest import mock
  import tensorflow.compat.v2
  from tf_agents.environments import test_envs
  from tf_agents.experimental.distributed import reverb_variable_container
  from tf_agents.experimental.distributed.examples import eval_job
  from tf_agents.policies import py_tf_eager_policy
  from tf_agents.policies import random_tf_policy
  from tf_agents.specs import tensor_spec
  from tf_agents.system import system_multiprocessing
  from tf_agents.utils import test_utils
label_desc: Use image node_id 3 for calling the EvalJobTest obj's underlying member method code with example usage: obj.count_summary_scalar_tags_in_call_list(mock_summary_scalar, tag) and returns: sum