code: def update_repository_method(namespace, method, synopsis, wdl, doc=None,
                               comment=""):
      
      with open(wdl, 'r') as wf:
          wdl_payload = wf.read()
      if doc is not None:
          with open (doc, 'r') as df:
              doc = df.read()
  
      body = {
          "namespace": namespace,
          "name": method,
          "entityType": "Workflow",
          "payload": wdl_payload,
          "documentation": doc,
          "synopsis": synopsis,
          "snapshotComment": comment
      }
  
      return __post("methods",
                    json={key: value for key, value in body.items() if value})
docs: Create/Update workflow definition.
  
      FireCloud will create a new snapshot_id for the given workflow.
  
      Args:
          namespace (str): Methods namespace
          method (str): method name
          synopsis (str): short (<80 char) description of method
          wdl (file): Workflow Description Language file
          doc (file): (Optional) Additional documentation
          comment (str): (Optional) Comment specific to this snapshot
  
      Swagger:
          https://api.firecloud.org/#!/Method_Repository/post_api_methods