<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def package_releases(request, package_name, show_hidden=False):
 """ Retrieve a list of the releases registered for the given package_name. Returns a list with all version strings if show_hidden is True or only the non-hidden ones otherwise."""

    session = DBSession()
    package = Package.by_name(session, package_name)
    return [rel.version for rel in package.sorted_releases]