<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_metadata(item):
 """Get metadata information from the distribution. Depending on the package this may either be in METADATA or PKG-INFO :param item: pkg_resources WorkingSet item :returns: metadata resource as list of non-blank non-comment lines """

    for metadata_key in ('METADATA', 'PKG-INFO'):
        try:
            metadata_lines = item.get_metadata_lines(metadata_key)
            break
        except (KeyError, IOError):
            # The package will be shown in the report without any license information
            # if a metadata key is not found.
            metadata_lines = []

    return metadata_lines