class_docstr: Create side effect function for mocking gcsfs glob method.
class_docstr_tok: ["Create","side","effect","function","for","mocking","gcsfs","glob","method","."]
docstr: Initialize side_effect function for mocking gcsfs glob method.
  
  Args:
      num_results (int or list): Number of results for each glob call
          to return. If a list then number of results per call. The
          last number is used for any additional calls.
docstr_tok: ["Initialize","side_effect","function","for","mocking","gcsfs","glob","method",".","Args",":","num_results","(","int","or","list",")",":","Number","of","results","for","each","glob","call","to","return",".","If","a","list","then","number","of","results","per","call",".","The","last","number","is","used","for","any","additional","calls","."]
code: def __init__(self, num_results):
      """Initialize side_effect function for mocking gcsfs glob method.
  
      Args:
          num_results (int or list): Number of results for each glob call
              to return. If a list then number of results per call. The
              last number is used for any additional calls.
  
      """
      self.current_call = 0
      if not isinstance(num_results, (list, tuple)):
          num_results = [num_results]
      self.num_results = num_results
  
imports: from __future__ import annotations
  import contextlib
  import io
  import os
  import sys
  import tarfile
  import unittest
  from collections import defaultdict
  from unittest import mock
  import pytest
label_desc: Use image node_id 1 to create a new _GlobHelper object from inherited base classes: object with example: obj = _GlobHelper(num_results)