code: def tz_replacer(s):
      if isinstance(s, string_types):
          if s.endswith("Z"):
              s = s[:-1]
          elif _tz_regex.search(s):
              s = s[:-5]
      return s
  
imports: import re
  import numpy
  from distutils.version import LooseVersion
  from pandas.compat import string_types, string_and_binary_types
label_desc: Use image node_id 1 for calling a global function with example usage: tz_replacer(s) and returns: s