code: def collect_metadata(self, name, obj):
          
          # Look through each subgroup
          base_name = name + "/" if name else ""
          for group_name, group_obj in obj.groups.items():
              self.collect_metadata(base_name + group_name, group_obj)
          for var_name, var_obj in obj.variables.items():
              var_name = base_name + var_name
              self.file_content[var_name] = var_obj
              self.file_content[var_name + "/dtype"] = var_obj.dtype
              self.file_content[var_name + "/shape"] = var_obj.shape
              self._collect_attrs(var_name, var_obj)
          self._collect_attrs(name, obj)
docs: Collect all file variables and attributes for the provided file object.
  
          This method also iterates through subgroups of the provided object.