code: def file_exists(value,
                  allow_empty = False,
                  **kwargs):
      
      if not value and not allow_empty:
          raise errors.EmptyValueError('value (%s) was empty' % value)
      elif not value:
          return None
  
      value = path_exists(value, force_run = True)                                # pylint: disable=E1123
  
      if not os.path.isfile(value):
          raise errors.NotAFileError('value (%s) is not a file')
  
      return value
docs: Validate that ``value`` is a valid file that exists on the local filesystem.
  
      :param value: The value to validate.
  
      :param allow_empty: If ``True``, returns :obj:`None <python:None>` if
        ``value`` is empty. If ``False``, raises a
        :class:`EmptyValueError <validator_collection.errors.EmptyValueError>`
        if ``value`` is empty. Defaults to ``False``.
      :type allow_empty: :class:`bool <python:bool>`
  
      :returns: The file name represented by ``value``.
      :rtype: Path-like object / :obj:`None <python:None>`
  
      :raises EmptyValueError: if ``allow_empty`` is ``False`` and ``value``
        is empty
      :raises NotPathlikeError: if ``value`` is not a path-like object
      :raises PathExistsError: if ``value`` does not exist on the local filesystem
      :raises NotAFileError: if ``value`` is not a valid file