<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_jar_id(jar_path):
 """Compute JAR id. Returns sha1 hash of a given JAR file. """

        jar_id = ""
        try:
            with open(jar_path, mode="rb") as f:
                m = hashlib.sha1()
                for buf in iter(partial(f.read, 4096), b''):
                    m.update(buf)
            jar_id = m.hexdigest()
        except IOError:
            pass
        return jar_id