"""Encode auth from a URL suitable for an HTTP header.

The function decodes the URL-encoded auth string, converts it to bytes, encodes it using Base64,
and returns the result as a string with any trailing newline characters removed.

Args:
    auth (str): A URL-encoded string containing the authentication credentials.

Returns:
    str: A Base64-encoded string of the authentication credentials, suitable for use in an HTTP header.

Examples:
    >>> str(_encode_auth('username%3Apassword'))
    'dXNlcm5hbWU6cGFzc3dvcmQ='

    Long auth strings should not cause a newline to be inserted.
    >>> long_auth = 'username:' + 'password'*10
    >>> chr(10) in str(_encode_auth(long_auth))
    False
"""
You should write code starting with:
import urllib.parse
import base64

def _encode_auth(auth: str) -> str:
    # TODO: Implement this function
    pass

