def METHOD_NAME(cls, url, **kwargs):
    """
    Create an :class:`Media` from a URL.
    :code:`Media.from_url(url)` is equivalent to:
    .. code-block: python
        med = Media(value=url, format='url')
    But both unicode and bytes arguments are allowed for ``url``.
    Parameters
    ----------
    url: [str, bytes]
        The location of a URL to load.
    """
    if isinstance(url, str):
        # If str, it needs to be encoded to bytes
        url = url.encode('utf-8')
    return cls(value=url, format='url', **kwargs)