code: def _read_file(path):
      '''
      Reads and returns the contents of a text file
      '''
      try:
          with salt.utils.files.fopen(path, 'rb') as contents:
              return salt.utils.yaml.safe_load(contents)
      except (OSError, IOError):
          return {f _read_file(path):
      '''
      Reads and returns the contents of a text file
      '''
      try:
          with salt.utils.files.fopen(path, 'rb') as contents:
              return salt.utils.yaml.safe_load(contents)
      except (OSError, IOError):
          return {}
docs: Reads and returns the contents of a text file