def METHOD_NAME(files_data):
    """Generate a file buffer based off a dictionary.
    :param files_data: A dictionary of strings.
        :key: filepath with filename included
        :value: the contents of the file encoded as bytes
    """
    if not isinstance(files_data, dict):
        return None
    if not all(isinstance(v, bytes) for v in files_data.values()):
        return None
    tar_buffer = io.BytesIO()
    with tarfile.open(fileobj=tar_buffer, mode="w:gz") as tar_file:
        for file_name, file_content in files_data.items():
            file_buffer = io.BytesIO(file_content)
            info = tarfile.TarInfo(name=file_name)
            info.size = len(file_buffer.getvalue())
            tar_file.addfile(tarinfo=info, fileobj=file_buffer)
    tar_buffer.seek(0)
    return tar_buffer