def METHOD_NAME(self, filepath: Path, test_mode):
    """
    Creates a single entry using a filepath and a type (file/dir)
    """
    filepath = filepath.absolute()
    entry = Entry()
    entry['location'] = str(filepath)
    entry['url'] = Path(filepath).absolute().as_uri()
    entry['filename'] = filepath.name
    if filepath.is_file():
        entry['title'] = filepath.stem
    else:
        entry['title'] = filepath.name
    file_stat = filepath.stat()
    try:
        entry['timestamp'] = datetime.fromtimestamp(file_stat.st_mtime)
    except Exception as e:
        logger.warning('Error setting timestamp for {}: {}', filepath, e)
        entry['timestamp'] = None
    entry['accessed'] = datetime.fromtimestamp(file_stat.st_atime)
    entry['modified'] = datetime.fromtimestamp(file_stat.st_mtime)
    entry['created'] = datetime.fromtimestamp(file_stat.st_ctime)
    if entry.isvalid():
        if test_mode:
            logger.info("Test mode. Entry includes:")
            logger.info(' Title: {}', entry['title'])
            logger.info(' URL: {}', entry['url'])
            logger.info(' Filename: {}', entry['filename'])
            logger.info(' Location: {}', entry['location'])
            logger.info(' Timestamp: {}', entry['timestamp'])
        return entry
    else:
        logger.error('Non valid entry created: {} ', entry)
        return